ci: migrate release workflow to changesets/action v2 - #65
Merged
Conversation
@changesets/cli was bumped to 3.0.2 while the workflow still pinned changesets/action@v1. The v1 action detects published packages by scraping `changeset publish` stdout for "New tag:" lines, and the v3 CLI replaced that output format. The regex matched nothing, so the action skipped both the tag push and the GitHub release while still exiting 0. That is why v0.20.0 reached npm with no v0.20.0 tag and no release, on a green run. v2 reads published packages from the CHANGESETS_OUTPUT file instead of stdout, and it is the version that supports the v3 CLI. Input renames required by v2: version -> version-script publish -> publish-script createGithubReleases -> create-github-releases v2 no longer reads the GITHUB_TOKEN environment variable, and the github-token input already defaults to the workflow token, so the env entry is dropped. v2 also removed its own .npmrc handling for NPM_TOKEN, so npm auth now relies solely on the .npmrc that actions/setup-node writes from NODE_AUTH_TOKEN.
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.
Problem
@seamless-auth/types@0.20.0published to npm on a green Release run, but nov0.20.0git tag and no GitHub Release were created.Dependabot bumped
@changesets/clifrom 2.31.1 to 3.0.2 in #57, whilerelease.ymlstill pinnedchangesets/action@v1.The v1 action detects what got published by scraping
changeset publishstdout forNew tag:lines:The v3 CLI replaced that output format. The publish log for the failing run shows:
No
New tag:line, so the regex matched nothing,releasedPackagesstayed empty, and neitherpushTagnorcreateReleaseran. The step still exited 0, so the workflow stayed green.This mismatch is called out in the action's own v2.0.0 notes: "Validate that projects use Changesets CLI v3 and direct Changesets CLI v2 users to
changesets/action@v1."Fix
Move to
changesets/action@v2, which reads published packages from theCHANGESETS_OUTPUTfile rather than stdout, and is the version built against the v3 CLI.Input renames required by v2:
versionversion-scriptpublishpublish-scriptcreateGithubReleasescreate-github-releasesTwo env entries are dropped:
GITHUB_TOKEN: v2 no longer reads it, and thegithub-tokeninput already defaults to the workflow token.NPM_TOKEN: v2 removed its own.npmrchandling, so npm auth relies solely on the.npmrcthatactions/setup-nodewrites fromNODE_AUTH_TOKEN(already configured viaregistry-url).Notes
.github/, notsrc/, so there is nothing to publish.v0.20.0is already on npm. Its tag and GitHub Release are being backfilled by hand, since this fix only repairs future releases.Checks
npm run typecheck,npm run lint,npm run format:check, andnpm test(233 tests, 17 files) all pass locally on Node 24.