Skip to content

Fix release workflow/Changesets major-version mismatch - #167

Merged
xinaesthete merged 2 commits into
mainfrom
copilot/fix-releasing-job-failure
Aug 26, 2026
Merged

xinaesthete merged 2 commits into
mainfrom
copilot/fix-releasing-job-failure

Conversation

Copilot AI commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

The release GitHub Actions job was failing before it could open the version PR because the workflow invoked changesets/action@v2 against a Changesets CLI v2 setup. This aligns the workflow action version with the repository’s current Changesets configuration.

  • Release workflow

    • Switch .github/workflows/release.yml from changesets/action@v2 to changesets/action@v1
    • Preserve the existing workflow contract (version, title, commit) used by this repo’s release flow
  • Why this change

    • changesets/action@v2 expects Changesets CLI v3
    • This repository is still on @changesets/cli v2, so the release job fails with a hard compatibility error
- name: Create version PR
-  uses: changesets/action@v2
+  uses: changesets/action@v1
  with:
    version: pnpm version-packages
    title: Version packages
    commit: Version packages

Co-authored-by: xinaesthete <674834+xinaesthete@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix the failing GitHub Actions job 'release' Fix release workflow/Changesets major-version mismatch Aug 26, 2026
Copilot AI requested a review from xinaesthete August 26, 2026 09:48

@xinaesthete xinaesthete left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original cause was a dependabot PR that looked like it would merge cleanly, so I'd rather avoid a situation like this from recurring in future.

@xinaesthete
xinaesthete marked this pull request as ready for review August 26, 2026 10:13
@xinaesthete
xinaesthete merged commit debafe0 into main Aug 26, 2026
6 checks passed
@xinaesthete
xinaesthete deleted the copilot/fix-releasing-job-failure branch August 26, 2026 10:14
xinaesthete added a commit that referenced this pull request Aug 26, 2026
…iring (#168)

#156 bumped changesets/action from v1 to v2 inside the routine weekly
`actions` Dependabot group. It was green — release.yml is triggered only by
`push: main`, so no pull request can exercise it — and broke the release on
main, which #167 reverted by pinning the action back to v1.

The action and the CLI are a matched pair, so take both majors together:

- `@changesets/cli` -> ^3.0.1 and `@changesets/changelog-github` -> ^1.0.0.
  changesets/action v2 dropped Changesets v2 support and hard-errors on it
  (changesets/action#699). Config `$schema` moved to @changesets/config@4.0.0.
- release.yml migrates to the v2 input names (`version` -> `version-script`,
  `title` -> `pr-title`, `commit` -> `commit-message`) and drops the
  `GITHUB_TOKEN` env block; `github-token` already defaults to the workflow
  token, and v2's `runVersion` still injects GITHUB_TOKEN into the version
  script so changelog-github keeps resolving PR and author links.

Both halves of the breakage are now checked at pull-request time:

- scripts/check-release-toolchain.mjs asserts the action major and the CLI
  major agree, and that every `with:` key is a real input of that major.
  Unknown inputs are silently dropped by GitHub Actions rather than failing,
  so a mis-migrated step would have run `changeset version` under a default
  PR title instead of `pnpm version-packages`. It runs as a `release-toolchain`
  job in Workflow Lint, which needs no dependency install, and as
  `pnpm lint:release-toolchain` locally.
- The Dependabot `actions` group is restricted to minor/patch, so action
  majors arrive as individually reviewable PRs. Same rationale already
  documented for the npm groups, plus the ecosystem-specific one: an action
  major is the bump this CI is structurally unable to test.

Verified by running `pnpm version-packages` against the v3 CLI (correct bumps
and linked changelog entries, reverted afterwards), `pnpm install
--frozen-lockfile`, actionlint 1.7.12, and all four failure modes of the new
check.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.

2 participants