fix(ci): unbreak the release pipeline (unpublished versions + main going red) - #267
Merged
Merged
Conversation
AlemTuzlak
force-pushed
the
fix/changesets-skip-ci-blocks-publish
branch
from
July 28, 2026 16:35
a8bad31 to
375b34a
Compare
…sion commit
`.changeset/config.json` had `"commit": true`, which changesets normalizes to
`["@changesets/cli/commit", { skipCI: "version" }]`. That makes `changeset
version` create the version commit itself, appending GitHub's skip-ci directive
to the message:
RELEASING: Releasing 1 package(s)
Releases:
react-router-devtools@6.2.2
<skip-ci directive>
Two consequences:
1. The `commit: "chore: release"` message configured in the Release workflow was
never used, because the action had nothing left to commit.
2. The directive survived the merge of the Release PR onto main, so GitHub
skipped every workflow on that push. The Release workflow -- the only thing
that runs `changeset publish` -- never fired.
Net effect: merging a Release PR bumped the version, wrote the CHANGELOG and
consumed the changeset, but published nothing. This bit 6.2.2 (bumped in #263 on
Jun 19, never reached npm; zero workflow runs recorded against that commit). It
was latent before that only because an unrelated push to main happened soon
after each release and picked up the publish by accident -- that is how 6.2.1
shipped.
Setting `"commit": false` leaves the commit to changesets/action, which uses the
workflow's `chore: release` message with no skip directive, so merging a Release
PR triggers Release and publishes.
Note: this message deliberately avoids spelling the directive literally, since
GitHub matches it anywhere in a commit message -- an earlier draft of this very
commit skipped its own CI.
commit: |
commit: |
`changeset version` rewrites `packages/react-router-devtools/package.json` with its own JSON printer, which expands `"files": ["dist"]` onto three lines. Biome wants it collapsed, so every release commit lands a formatting violation on main, and Biome lint then fails on that commit and on every PR opened afterwards until somebody notices and collapses it by hand. It has been ping-ponging for three releases straight: a46c47f RELEASING: ... expands (release breaks it) 0263127 ci: harden release collapses (hand fix) becd7c9 RELEASING: ... expands (release breaks it again) main is currently in the expanded state, which is why the Validation Pipeline went red on the Vite 8 PR and on the first push of this branch. Chaining `biome format --write .` after `changeset version` closes the loop, so the version commit is formatted when it is created rather than after the fact. Same chain added to `local-release` so manual releases behave identically. Verified end to end with a scratch changeset: `changeset version` expands the array, the formatter collapses it back ("Fixed 1 file"), and `biome check .` passes across all 224 files. Also confirms the companion `"commit": false` change works -- changesets now reports "Review them and commit at your leisure" instead of creating its own commit. The collapse of `files` in this commit repairs main's current state.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two independent bugs in the release pipeline, both traced from "6.2.2 never got published".
Bug 1 — the version commit suppresses its own publish
.changeset/config.jsonhad"commit": true. Changesets normalizes that to["@changesets/cli/commit", { skipCI: "version" }], sochangeset version(run viapnpm run version) creates the version commit itself, appending GitHub's skip-ci directive to the message:Two consequences:
commit: "chore: release"message configured in.github/workflows/publish.yamlwas never used — the action had nothing left to commit.main, so GitHub skipped every workflow on that push. The Release workflow — the only thing that runschangeset publish— never fired.Evidence
6.2.2was bumped by #263 (merged Jun 19,becd7c9) and never reached npm:Zero workflow runs against the version commit. No tag, no GitHub release, npm
lateststuck on6.2.1for five weeks.The bug is not new — it was only ever masked.
6.2.1's version commit (a46c47f) hit the same wall; what shipped it was the next, unrelated push tomain(6eab97d), which found no pending changesets and fell through to the publish branch. Compare timestamps: that run started 11:17, npm recorded6.2.1at 11:18. Every release so far has published by accident, riding whatever push happened to land next.6.2.2had no such ride.This PR's first commit initially reproduced the bug on itself — it quoted the directive literally, and GitHub skipped CI on this branch too (0 runs). Reworded; CI then ran. That is about as direct a confirmation as the diagnosis could get.
Fix
"commit": false— leave the commit tochangesets/action, which uses the workflow'schore: releasemessage with no skip directive. Merging a Release PR then triggers Release and publishes.Bug 2 — every release turns
mainredchangeset versionalso rewritespackages/react-router-devtools/package.jsonwith its own JSON printer, expanding"files": ["dist"]onto three lines. Biome wants it collapsed, so each release commit lands a formatting violation onmain— and Biome lint then fails on that commit and on every PR opened afterwards until someone collapses it by hand.Ping-ponging for three releases straight:
a46c47fRELEASING: ...0263127ci: harden releasebecd7c9RELEASING: ...mainis in the expanded state right now, which is why the Validation Pipeline went red on the Vite 8 PR 3 days ago.Fix
Chain
biome format --write .afterchangeset versionin theversionandlocal-releasescripts, so the version commit is formatted when created. Thefilescollapse in this PR repairsmain's current state.Verification
Ran a scratch changeset through
pnpm run versionlocally with deps installed (repo-pinned Biome 1.9.4, not a global one):changeset versionexpands the array → formatter collapses it back (Fixed 1 file) →biome check .passes across all 224 files"Review them and commit at your leisure"instead of creating its own commit, confirming"commit": falsetakes effectScratch changeset and bump artifacts reverted; the diff is 2 files, 3 insertions, 5 deletions.
6.2.2 has been unblocked separately
Published via the
workflow_dispatchsafety valve added in #258 (run 30378689522):latest→6.2.2, with SLSA provenance (https://slsa.dev/provenance/v1)react-router-devtools@6.2.2+ GitHub release createdSo this PR is purely the forward fix; no republish needed.
What to watch after merge
The next release should show a
chore: releasecommit onmainwith a Release workflow run attached to it, publishing to npm with no manual dispatch, and leavingmainformatted. No changeset included here — CI config only, no published package changed.