Description
.github/workflows/pnpm-release-changeset.yml pins changesets/action@v2.0.0 but still passes the v1 input names. changesets/action@v2.0.0 renamed every one of them:
| Passed by the workflow (v1) |
Actual v2.0.0 input |
version |
version-script |
publish |
publish-script |
commit |
commit-message |
title |
pr-title |
GitHub Actions does not fail on unknown with: keys — it ignores them. So the action runs with all three of these unset, and falls back to its defaults.
The consequential one is publish-script. When it is unset, the action only ever creates/updates a version PR and never publishes to npm. There is no error; the job goes green. A release would appear to succeed while nothing is published.
Secondary effects:
version-script unset falls back to the built-in changeset version, bypassing pnpm run version. Benign for consumers whose version script is just changeset version, but it is no longer the repo's own script.
commit-message unset falls back to Version Packages instead of the intended chore: version packages.
Additional concern: token and permissions
changesets/action@v2.0.0 pushes release commits and tags through the GitHub API by default (push-with-git-cli defaults to false), authenticated by the github-token input, which defaults to ${{ github.token }}.
The workflow supplies its custom token only as the GITHUB_TOKEN environment variable (secrets.CI_GITHUB_TOKEN), not as the github-token input. Under v2 that env var is not what the action authenticates with, so the custom token is effectively ignored.
That matters because the job declares permissions: contents: read, while pushing commits and tags requires contents: write. Worth verifying both together when fixing the input names.
Also: changesets/action@v2 requires Changesets CLI v3
v2.0.0's release notes state it updates to Changesets v3 packages, and it validates the consumer's CLI version, directing CLI v2 users to changesets/action@v1.
Any repo using this reusable workflow while still on @changesets/cli v2 is therefore already mismatched. repobuddy/repobuddy is upgrading to @changesets/cli v3 now, which resolves that half — but the renamed inputs above are independent of the CLI version and still need fixing here.
Expected Behavior
The reusable workflow invokes changesets/action@v2.0.0 with the input names that version actually accepts, so pnpm run release runs and packages publish.
Actual Behavior
publish-script is never set, so the publish step does not run. The workflow reports success without publishing.
Suggested Fix
- uses: changesets/action@v2.0.0
with:
github-token: ${{ secrets.CI_GITHUB_TOKEN }}
commit-message: 'chore: version packages'
version-script: pnpm run version
publish-script: pnpm run release
plus raising the job's permissions to contents: write (keeping id-token: write).
Notes
Found while upgrading repobuddy/repobuddy to @changesets/cli v3. That repo consumes this reusable workflow but cannot change it, so recording the coupling here before the upgrade lands.
Description
.github/workflows/pnpm-release-changeset.ymlpinschangesets/action@v2.0.0but still passes the v1 input names.changesets/action@v2.0.0renamed every one of them:versionversion-scriptpublishpublish-scriptcommitcommit-messagetitlepr-titleGitHub Actions does not fail on unknown
with:keys — it ignores them. So the action runs with all three of these unset, and falls back to its defaults.The consequential one is
publish-script. When it is unset, the action only ever creates/updates a version PR and never publishes to npm. There is no error; the job goes green. A release would appear to succeed while nothing is published.Secondary effects:
version-scriptunset falls back to the built-inchangeset version, bypassingpnpm run version. Benign for consumers whoseversionscript is justchangeset version, but it is no longer the repo's own script.commit-messageunset falls back toVersion Packagesinstead of the intendedchore: version packages.Additional concern: token and permissions
changesets/action@v2.0.0pushes release commits and tags through the GitHub API by default (push-with-git-clidefaults tofalse), authenticated by thegithub-tokeninput, which defaults to${{ github.token }}.The workflow supplies its custom token only as the
GITHUB_TOKENenvironment variable (secrets.CI_GITHUB_TOKEN), not as thegithub-tokeninput. Under v2 that env var is not what the action authenticates with, so the custom token is effectively ignored.That matters because the job declares
permissions: contents: read, while pushing commits and tags requirescontents: write. Worth verifying both together when fixing the input names.Also: changesets/action@v2 requires Changesets CLI v3
v2.0.0's release notes state it updates to Changesets v3 packages, and it validates the consumer's CLI version, directing CLI v2 users to
changesets/action@v1.Any repo using this reusable workflow while still on
@changesets/cliv2 is therefore already mismatched.repobuddy/repobuddyis upgrading to@changesets/cliv3 now, which resolves that half — but the renamed inputs above are independent of the CLI version and still need fixing here.Expected Behavior
The reusable workflow invokes
changesets/action@v2.0.0with the input names that version actually accepts, sopnpm run releaseruns and packages publish.Actual Behavior
publish-scriptis never set, so the publish step does not run. The workflow reports success without publishing.Suggested Fix
plus raising the job's
permissionstocontents: write(keepingid-token: write).Notes
Found while upgrading
repobuddy/repobuddyto@changesets/cliv3. That repo consumes this reusable workflow but cannot change it, so recording the coupling here before the upgrade lands.