chore(deps): bump changesets/action from 1 to 2 - #989
Conversation
|
There was a problem hiding this comment.
Bumping changesets/action v1 → v2 without updating the workflow will break the release pipeline
v2 is a major release with breaking input/output renames, and .github/workflows/push.yml (the only consumer of this action) still uses the v1 names. I compared the v1 and v2 action.yml and three things the workflow relies on have changed:
| Used in workflow | v1 | v2 |
|---|---|---|
| input | version: |
version-script: |
| input | setupGitUser: |
removed |
| output | hasChangesets |
has-changesets |
Why this is high risk
Unknown with: inputs and unknown output references don't fail the step — they're silently ignored / resolve to empty strings — so CI stays green while the release logic quietly misbehaves. Concretely, after this merges the next release run would:
-
version:is ignored → the version step reverts to the defaultchangeset version. The repo'sversionscript ischangeset version && pnpm install --no-frozen-lockfile, so thepnpm installlockfile update would no longer run and version PRs would ship an out-of-datepnpm-lock.yaml. In v2 this must beversion-script:. -
steps.changesets.outputs.hasChangesetsresolves to empty. This output is nowhas-changesets. It's consumed at line 123 (job output) and line 157 (if: … == 'false'). With an empty value, theCreate Tagsstep (if: … hasChangesets == 'false') never runs, and consequently thereleasejob gate at line 170 (needs.create-tags.outputs.has-changesets == 'false' && …) is never satisfied — tags are never created and nothing is ever released. These references need to be updated tohas-changesets. -
setupGitUser: falseis no longer a recognized input (removed in v2). Harmless dead config, but should be removed. Note the workflow already configures git user in a separate step and checks out withssh-key: COMMIT_KEY.
Also worth confirming: token & push mode (line 151–153)
v2 removed support for authenticating via the GITHUB_TOKEN environment variable — a custom token must be passed through the github-token input (which defaults to ${{ github.token }}). More importantly, v2 now pushes release commits/tags via the GitHub API by default instead of the git CLI. Today this job checks out with ssh-key: COMMIT_KEY specifically so pushes go through that deploy key (typically to trigger downstream CI on the version PR). Under v2's default, the push would instead use github.token via the API, bypassing COMMIT_KEY. If you want to preserve the current behavior, set push-with-git-cli: true (and note the API push path requires the token to have contents: write / pull-requests: write, which the create-tags job doesn't currently declare).
Why CI didn't catch this
push.yml only triggers on push to master/main, so none of the green PR checks actually run the v2 action — the breakage would only appear on the first post-merge release.
Suggested change
- name: Create Release Pull Request
id: changesets
uses: changesets/action@v2
with:
version-script: pnpm run version
# push-with-git-cli: true # keep git-CLI/ssh-key push behavior if desired
env:
HUSKY: 0and update the two hasChangesets references (lines 123 and 157) to has-changesets.
The version bump itself is fine — it just needs the workflow updated in the same PR. Since Dependabot won't do that, this needs a manual follow-up commit before merging.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Review comments addressed in 343a81c — plus a blocker the review missed
changesets/action v1 → v2
@changesets/cli v2 → v3
Already-satisfied v3 requirements, checked: Node VerificationSince
What is still not covered by any test: the actual No changeset file added — this is release tooling only, no publishable package changes. |
Bumps [changesets/action](https://github.com/changesets/action) from 1 to 2. - [Release notes](https://github.com/changesets/action/releases) - [Changelog](https://github.com/changesets/action/blob/main/CHANGELOG.md) - [Commits](changesets/action@v1...v2) --- updated-dependencies: - dependency-name: changesets/action dependency-version: '2' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
changesets/action v2 refuses to run against Changesets CLI v2, so the
Dependabot bump on its own would fail the release step on the first push
to master. Bump the CLI to v3 and update push.yml for both majors.
Action v2 renames:
- `version` -> `version-script` (v2 hard-errors on the old name)
- `hasChangesets` output -> `has-changesets` (silently empty otherwise,
which would have stopped tags and releases entirely)
- `setupGitUser` removed; git user is already configured in its own step
- `GITHUB_TOKEN` env removed in favour of the `github-token` input default
- `push-with-git-cli: true` keeps release pushes on the COMMIT_KEY deploy
key rather than v2's new default GitHub API push
CLI v3 changes:
- `changeset tag` renamed to `changeset git-tag`
- private packages are no longer versioned by default, which broke config
validation for public packages depending on `shared`/`themes`/`types`;
`privatePackages: { version: true, tag: false }` restores the v2 default
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
343a81c to
7948779
Compare
Bumps changesets/action from 1 to 2.
Release notes
Sourced from changesets/action's releases.
... (truncated)
Changelog
Sourced from changesets/action's changelog.
... (truncated)
Commits
8488615v2.1.1d7669c8Version Packages (#722)da1ea29Fix typo in renamed inputs (#721)7545547Version Packages (#719)3043070Prevent test warning annotations (#720)3b7c71cAdd back cwd input (#718)6f58ba3Update pr-status message links to new faq (#716)e52ce9eVersion Packages (#715)78fdc6bExit pre mode (#714)187a104Update deps for stable (#709)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)