ci: upgrade to changesets v3 and support maintenance releases - #354
Merged
Conversation
Bumps @changesets/cli to v3 and the release action to changesets/action@v2, which is the version built against changesets v3. The action renamed its inputs to kebab-case and dropped support for configuring the token through the GITHUB_TOKEN environment variable, so those move over too. Releases can now also run from `vN` maintenance branches. The branch decides the npm dist-tag, so a 4.x backport publishes under `v4` instead of taking `latest` from the current major, and its GitHub release is demoted so it does not take the "Latest" badge either.
rexxars
force-pushed
the
chore/changesets-v3-maintenance-releases
branch
from
August 12, 2026 19:25
1388421 to
a43e5bb
Compare
The demotion now goes through the releases REST API with the explicit `make_latest=false` string enum, rather than `gh release edit --latest=false`, which depends on how the runner's gh build handles negated boolean flags. More importantly it now verifies the result: after clearing the flag the step re-reads the repository's latest release and fails the job if it is still one of the versions just published. Previously a demotion that silently did not apply would have left the badge on the wrong major with the job green.
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.
Upgrades the release tooling to changesets v3, and makes it possible to ship fixes for older majors without disturbing the current one.
Changesets v3
@changesets/cli^2.31.1->^3.0.0,@changesets/changelog-github^0.7.0->^1.0.0, config$schema->@changesets/config@4.0.0.changesets/action@v2.0.0(pinned to22ccf9a). There is no action v3 - v2 is the release built against changesets v3, and it refuses to run against a v2 CLI. Its breaking changes are handled here:version->version-script,publish->publish-script,commit->commit-message,title->pr-title.GITHUB_TOKENenvironment variable is no longer read, so that block is dropped in favour of the action'sgithub-tokeninput default.format: "oxfmt"explicitly, since v3 removed theprettieroption in favour offormat. Auto-detection would find oxfmt anyway; being explicit removes the guess.Worth knowing:
changeset versionnow exits 1 when there are no unreleased changesets. The action only invokes the version script when changesets exist, so CI is unaffected, but runningnpm run version:packagesby hand on a clean tree will now fail rather than no-op.Maintenance releases
release.ymlandchangeset.ymlnow trigger onmainplus anyv[0-9]+branch. AResolve release channelstep runs before checkout and maps the branch to an npm dist-tag, failing closed on anything else:main->latestv4->v4The job-level
ifstill blocksworkflow_dispatchfrom arbitrary refs; it just cannot express a pattern, so the step narrows it to exactlymainorvN.Two problems this had to solve, neither of which is obvious:
changeset publishdefaults to thelatestdist-tag. Without--tag, a 4.x backport would have become the default install for everyone runningnpm install eventsource.changesets/actioncallsrepos.createReleasewithoutmake_latest, and the GitHub API defaults that to true. A backport would have taken the "Latest" release badge off the current major. A post-publish step demotes it, on maintenance branches only.Both are handled by the workflow; there is nothing to pass by hand when cutting a backport.
Companion branch
v4has been reset to tagv4.1.1and carries the same tooling, withbaseBranch: "v4"and identical workflow files. It was previously a stale pre-5.0 development branch sitting at 3.0.7, fully contained inmain.3.x is not supported, so there is no
v3branch.SECURITY.mdis updated to say so explicitly - the table previously listed 4.x and< 3.0but left 3.x unstated.Verification
npm cipasses from the regenerated lockfiles.main,v4,v10,v1.x,v2.x,vfoo,fix/thing,v4-hackand an empty ref. Only the first three resolve; the rest fail the step.oxfmt --checkfailures (package.json,test/tests.ts) also fail on unmodifiedmainand are left alone.Note for after merge
npm's trusted publisher pins the workflow filename but not the branch, which is what lets
v4publish at all. Renamingrelease.ymlbreaks publishing on every branch at once.