chore(ci): migrate the release workflow to changesets/action v2 - #1045
chore(ci): migrate the release workflow to changesets/action v2#1045frahlg wants to merge 1 commit into
Conversation
Dependabot #1035 moved the tag alone. v2 renamed every input and output, so the tag on its own leaves five silent regressions behind. - `version`, `title` and `commit` are gone. Unknown `with:` keys only warn, so the action would have fallen back to a bare `changeset version` and dropped the `npm install --package-lock-only` half of `version-packages`, drifting package-lock.json off package.json. - v2 no longer reads the GITHUB_TOKEN environment variable. The token is an input now; without it the action authenticates as `github.token`, whose pushes start no workflows, so the Version Packages PR would arrive with no checks. CI_TOKEN exists for exactly that reason. - v2 pushes through the GitHub API by default, which would have made the CI_TOKEN auth header installed one step earlier dead weight. `push-with-git-cli: true` keeps the existing credential path. - `hasChangesets` is `has-changesets`. The stale name reads as empty, so the five stable-promotion guards comparing it to 'false' would never fire: a `workflow_dispatch` promotion would go green having skipped the GHCR write checks, the tag and the draft release. @changesets/cli is already ^3.0.1, which is what v2 requires. release-metadata.test.mjs pinned the old input name; it now pins the new one, plus the output name against the action major that publishes it, so the tag and the expressions reading it cannot drift apart again. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017J8AuNpMQpExYq5qG5iQe9
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
miravoss26
left a comment
There was a problem hiding this comment.
Migrates the release workflow's changesets/action v1 → v2 and renames every input/output the action expects, exactly right: checked the live action.yml on changesets/action@v2.1.1 and github-token, push-with-git-cli, version-script, pr-title, commit-message, and outputs.has-changesets all match upstream verbatim. Deliberately not passing publish-script matches the stated rationale (publish is done manually below).
The push-with-git-cli: true call (flagged in the PR description as worth a second opinion) is correct: v2's default API push uses github.token, whose commits don't trigger new workflow runs, which would leave the Version Packages PR with no checks. Keeping the CLI push with CI_TOKEN preserves that.
Workflow-only change, no job actually exercises this path, but the new regression test (web/release-metadata.test.mjs) pins both the uses: major and the output name together so they can't silently drift apart again, which is the right guard for exactly the failure mode #1035 would have shipped. Safe to merge from my read.


Supersedes #1035, which bumped the tag alone.
changesets/actionv2 renamed every input and output. GitHub Actionsonly warns on an unknown
with:key, so the bare tag bump would havegone green while quietly changing what the release workflow does.
What the tag bump alone would have done
version:version-script:changeset version, dropping thenpm install --package-lock-onlyhalf ofversion-packages.package-lock.jsondrifts offpackage.json.title:/commit:pr-title:/commit-message:env: GITHUB_TOKENgithub-token:inputgithub.token, whose pushes start no workflows — the Version Packages PR would arrive with no checks.CI_TOKENexists for exactly that reason.push-with-git-cli:trueto keep the existing credential path.outputs.hasChangesetsoutputs.has-changesets'' == 'false'is false, so all five stable-promotion guards skip. Aworkflow_dispatchpromotion would report success having skipped the GHCR write checks, the tag and the draft release.@changesets/cliis already^3.0.1; v2 requires v3, so that gate passes.Test
web/release-metadata.test.mjspinned the v1 input name, which is howthe mismatch surfaced. It now pins the v2 name, and additionally pins
the output name against the action major that publishes it — so the
uses:tag and the expressions reading its outputs cannot drift apartagain silently.
npm test— 482 pass.Review
Workflow-only, so no job in CI actually exercises this path. The
push-with-git-cli: truechoice is the one worth a second opinion: itkeeps today's behaviour rather than moving to v2's API push. Moving to
the API push would mean deleting both credential-juggling steps and
letting
github-tokencarry the push — cleaner, but a bigger changethan a dependency bump should carry, and it needs a real release to
prove out.
Closes #1035
Note
Medium Risk
Release and stable-promotion behavior depends on correct action inputs/outputs; mistakes would skip promotion steps or mis-version lockfiles, though this PR explicitly fixes those v2 migration footguns and adds tests.
Overview
Upgrades the release workflow from changesets/action v1 to v2 and renames every input/output the action expects, so a tag-only bump cannot pass CI while silently breaking versioning or stable promotion.
The Version Packages step now passes
github-token(scopedCI_TOKEN) andpush-with-git-cli: trueinstead of relying onGITHUB_TOKENinenv, and usesversion-script,pr-title, andcommit-messagefor the lockfile-awareversion-packagesscript and PR metadata. All stable-promotion guards that run only when there are no pending changesets now readsteps.changesets.outputs.has-changesets(v2 kebab-case); the oldhasChangesetsname would read empty and skip GHCR checks, tagging, and draft release creation onworkflow_dispatch.web/release-metadata.test.mjsasserts the v2version-scriptwiring and adds a regression test that pinsuses: changesets/action@v2tohas-changesetsand forbids stalehasChangesetsreferences.Reviewed by Cursor Bugbot for commit a0c0fac. Bugbot is set up for automated code reviews on this repo. Configure here.