Skip to content

ci: migrate release workflow to changesets/action v2 - #65

Merged
Bccorb merged 1 commit into
mainfrom
ci/changesets-action-v2
Sep 7, 2026
Merged

ci: migrate release workflow to changesets/action v2#65
Bccorb merged 1 commit into
mainfrom
ci/changesets-action-v2

Conversation

@Bccorb

@Bccorb Bccorb commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Problem

@seamless-auth/types@0.20.0 published to npm on a green Release run, but no v0.20.0 git tag and no GitHub Release were created.

Dependabot bumped @changesets/cli from 2.31.1 to 3.0.2 in #57, while release.yml still pinned changesets/action@v1.

The v1 action detects what got published by scraping changeset publish stdout for New tag: lines:

let newTagRegex = /New tag:/;
for (let line of changesetPublishOutput.stdout.split("\n")) {
  if (line.match(newTagRegex)) {
    await git.pushTag(`v${pkg.packageJson.version}`);
    await createRelease(octokit, { pkg, tagName });

The v3 CLI replaced that output format. The publish log for the failing run shows:

🦋 changeset v3.0.2
◇  Successfully published:
@seamless-auth/types@0.20.0
◇  Created git tags.

No New tag: line, so the regex matched nothing, releasedPackages stayed empty, and neither pushTag nor createRelease ran. 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 the CHANGESETS_OUTPUT file rather than stdout, and is the version built against the v3 CLI.

Input renames required by v2:

v1 v2
version version-script
publish publish-script
createGithubReleases create-github-releases

Two env entries are dropped:

  • GITHUB_TOKEN: v2 no longer reads it, and the github-token input already defaults to the workflow token.
  • NPM_TOKEN: v2 removed its own .npmrc handling, so npm auth relies solely on the .npmrc that actions/setup-node writes from NODE_AUTH_TOKEN (already configured via registry-url).

Notes

  • No changeset: this touches only .github/, not src/, so there is nothing to publish.
  • v0.20.0 is 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, and npm test (233 tests, 17 files) all pass locally on Node 24.

@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.
@Bccorb
Bccorb merged commit 81d1354 into main Sep 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant