Repository navigation
ci(release): upgrade changesets/action to v2 for @changesets/cli v3 - #1995
Merged
Merged
Conversation
@changesets/cli v3 no longer prints the "New tag: <pkg>@<version>" lines that changesets/action v1.9.0 scraped to learn which packages were published. The action therefore saw zero published packages: it pushed no git tags, created no GitHub releases, and set published=false -- while npm publishing itself succeeded. 3.6.0 reached npm with no GitHub release history because of this, and the publish step still reported success. Two v3 breaking changes combined to produce the failed run: - Published-package detection moved from stdout parsing to a shared output file named by CHANGESETS_OUTPUT (changesets/action#678). Action v1 has no such support and reported published=false, which skipped tagging and releases and also un-gated the canary step below. - `changeset version` now exits 1 when there are no unreleased changesets (changesets/changesets#1860); v2 exited 0 silently. That turned the un-gated canary step into a hard job failure. Upstream treats these as a matched pair and action v2 validates it, refusing CLI v2 (changesets/action#699). There is no equivalent check in v1 for CLI v3, which is why the mismatch degraded silently instead of failing fast. Changes: - changesets/action v1.9.0 -> v2.1.2, using v2's renamed kebab-case inputs and passing the app token through the `github-token` input, which is now required for custom tokens. `commitMode: github-api` is dropped because v2 uses the GitHub API by default. - Guard both canary steps on the presence of changeset files, so an emptied .changeset/ is a clean skip rather than exit 1. - Add a step asserting that the version present on npm has a matching git tag, so a silent tagging failure fails the job instead of reporting success. - Remove scripts/print_release_version.sh and its step. Its output was read nowhere in the workflow, its exit code was swallowed by the surrounding command substitution, and it ran `changeset version` followed by `git reset --hard` inside the release job. Co-Authored-By: Claude Opus 5 <[email protected]>
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Bundle Size ReportLast updated: 2026-09-23 07:29:15 UTC
Baseline source: comment-chain |
The explanatory blocks restated the commit message and PR description, which git blame already reaches, and ran six to eight lines in a file whose idiom is one- to three-line constraint notes. Keep only what is not visible in the code and would be re-broken if removed: that the action and CLI majors move together, that the tag check is deliberately independent of the action's own report, and why the canary steps test for changeset files before versioning. Co-Authored-By: Claude Opus 5 <[email protected]>
This branch was successfully deployed
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.
Summary
The 3.6.0 release published all five packages to npm but created no git tags
and no GitHub releases, and the publish step still reported success. This
restores the release pipeline and recovers the missing history.
The git tags and GitHub releases for 3.6.0 have already been created manually
on
d1d331e44(theci(changesets): version packages (#1944)commit) — are-run cannot recreate them, because npm already has 3.6.0, so
changeset publishreports nothing to publish and emits no entries to tag.Root cause
@changesets/cliandchangesets/actionare a matched pair upstream:New tag: <pkg>@<ver>from stdoutCHANGESETS_OUTPUTThe pair got split:
changesets/actionv1.9.0 → v2.1.1).closed this PR without merging, Renovate will ignore this update. You will
not get PRs for any future
2.xreleases."@changesets/cli2.31.1 → 3.0.2 (then 3.0.3 inchore(deps): update dependency @changesets/cli to v3.0.3 #1993), leaving CLI v3 running against action v1.9.0.
Two independent v3 breaking changes then combined:
New tagis present in@changesets/[email protected]'sdist/and absent in3.0.3's. Action v1.9.0 matches it atsrc/run.ts:101, found zeropackages, so the
createGithubReleasesblock looped over an empty array —no
pushTag, nocreateRelease— and setpublished=false. This issilent by construction: an empty loop cannot throw.
changeset versionexit code flipped (fix(version): exit with code 1 when no unreleased changesets found changesets/changesets#1860):return(exit 0) becamethrow new ExitError(1)when there are nounreleased changesets.
(1) un-gated the canary step (
if: published != 'true'), and (2) turned itinto a hard failure against an emptied
.changeset/. Under CLI v2, (1) alonewould still have lost the tags and releases while the run stayed green.
It stayed hidden for three days because neither break is reachable on a normal
push: at the #1975 merge,
.changeset/still held changesets, sopublished=falsewas the correct answer and--snapshotfound work to do.The first real release after the upgrade is when both fired.
Upstream guards this pair in one direction only — action v2 refuses CLI v2
(changesets/action#699) — but v1 has no check rejecting CLI v3.
Changes
changesets/actionv1.9.0 → v2.1.2. v2 readsCHANGESETS_OUTPUT, whichit injects into the custom scripts' environment along with
GITHUB_TOKEN(
src/run.ts:176-184), sopublish-script: pnpm changeset publishneeds nochange and
@changesets/changelog-githubstill gets its token. All inputswere renamed in v2, so this is not a version-only bump:
publish/versionpublish-script/version-scriptcommit/titlecommit-message/pr-titlecreateGithubReleasescreate-github-releasescommitMode: "github-api"GITHUB_TOKENviaenvgithub-tokeninput (env no longer honoured)Guarded both canary steps on the presence of changeset files, so an empty
.changeset/is a clean skip instead ofexit 1.Added a tagging assertion. If the version on npm has no matching git tag,
the job now fails with an actionable message instead of reporting success.
Verified locally against all paths, including that it would have caught this
incident and that its
ls-remotepattern does not match sibling packages.Removed
scripts/print_release_version.shand its step. Its output(
steps.release_version.outputs.VALUE) is read nowhere in the workflow, itsexit code was swallowed by
echo "VALUE=$(...)", and it ranchangeset versionfollowed bygit reset --hardinside the release job.Side benefit
Renovate said "if you manually upgrade to
2.xthen Renovate will re-enableminorandpatchupdates automatically." Landing v2.1.2 by hand lifts thesuppression left by #1931.
Verification
assertion.
version absent from npm (skip), and no cross-package false match.
proof is the next version PR merge. Worth watching that run.
No changeset needed — CI configuration only, no published package changed.