Skip to content

fix(ci): unbreak the release pipeline (unpublished versions + main going red) - #267

Merged
AlemTuzlak merged 2 commits into
mainfrom
fix/changesets-skip-ci-blocks-publish
Jul 28, 2026
Merged

fix(ci): unbreak the release pipeline (unpublished versions + main going red)#267
AlemTuzlak merged 2 commits into
mainfrom
fix/changesets-skip-ci-blocks-publish

Conversation

@AlemTuzlak

@AlemTuzlak AlemTuzlak commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

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.json had "commit": true. Changesets normalizes that to ["@changesets/cli/commit", { skipCI: "version" }], so changeset version (run via pnpm run version) creates 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 .github/workflows/publish.yaml was never used — 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.

Evidence

6.2.2 was bumped by #263 (merged Jun 19, becd7c9) and never reached npm:

$ gh api ".../actions/runs?head_sha=becd7c954d7aba358418fa5aee6e253344cce01e"
total_count: 0

Zero workflow runs against the version commit. No tag, no GitHub release, npm latest stuck on 6.2.1 for 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 to main (6eab97d), which found no pending changesets and fell through to the publish branch. Compare timestamps: that run started 11:17, npm recorded 6.2.1 at 11:18. Every release so far has published by accident, riding whatever push happened to land next. 6.2.2 had 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 to changesets/action, which uses the workflow's chore: release message with no skip directive. Merging a Release PR then triggers Release and publishes.

Bug 2 — every release turns main red

changeset version also rewrites packages/react-router-devtools/package.json with its own JSON printer, expanding "files": ["dist"] onto three lines. Biome wants it collapsed, so each release commit lands a formatting violation on main — 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:

commit effect
a46c47f RELEASING: ... expands (release breaks it)
0263127 ci: harden release collapses (hand fix)
becd7c9 RELEASING: ... expands (release breaks it again)

main is 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 . after changeset version in the version and local-release scripts, so the version commit is formatted when created. The files collapse in this PR repairs main's current state.

Verification

Ran a scratch changeset through pnpm run version locally with deps installed (repo-pinned Biome 1.9.4, not a global one):

  • changeset version expands the array → formatter collapses it back (Fixed 1 file) → biome check . passes across all 224 files
  • changesets reports "Review them and commit at your leisure" instead of creating its own commit, confirming "commit": false takes effect

Scratch 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_dispatch safety valve added in #258 (run 30378689522):

  • npm latest6.2.2, with SLSA provenance (https://slsa.dev/provenance/v1)
  • tag react-router-devtools@6.2.2 + GitHub release created

So this PR is purely the forward fix; no republish needed.

What to watch after merge

The next release should show a chore: release commit on main with a Release workflow run attached to it, publishing to npm with no manual dispatch, and leaving main formatted. No changeset included here — CI config only, no published package changed.

@AlemTuzlak
AlemTuzlak force-pushed the fix/changesets-skip-ci-blocks-publish branch from a8bad31 to 375b34a Compare July 28, 2026 16:35
…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.
@pkg-pr-new

pkg-pr-new Bot commented Jul 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/react-router-devtools@267

commit: b81ceff

@pkg-pr-new

pkg-pr-new Bot commented Jul 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/react-router-devtools@267

commit: 375b34a

`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.
@AlemTuzlak AlemTuzlak changed the title fix(ci): stop changesets from stamping [skip ci] on the version commit fix(ci): unbreak the release pipeline (unpublished versions + main going red) Jul 28, 2026
@AlemTuzlak
AlemTuzlak merged commit cee8b01 into main Jul 28, 2026
7 checks passed
@AlemTuzlak
AlemTuzlak deleted the fix/changesets-skip-ci-blocks-publish branch July 28, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant