From 39f575d52b754ff63c5f74034165c8af72a45636 Mon Sep 17 00:00:00 2001 From: unional Date: Wed, 12 Aug 2026 23:38:28 -0700 Subject: [PATCH 1/2] fix: restore changesets/action v1 across the changeset workflows Reverts the Renovate bump in 7c50b05, which moved every changesets workflow to changesets/action@v2.0.0. That major renamed the inputs and added a hard check on the consumer's @changesets/cli major. Six of the seven workflows still pass the v1 names (commit / version / publish), which v2 rejects outright: Error: The following inputs have been renamed: - "publish" -> "publish-script" - "version" -> "version-script" - "commit" -> "commit-mesage" and all seven would additionally fail for consumers on CLI v2: This version of the Changesets action is designed to work with Changesets CLI v3. Changesets CLI v2 is not supported; use Changesets action v1 instead. Eleven of the thirteen consumers of pnpm-release-changeset.yml are on @changesets/cli v2, so main stays the v1 line. The two on v3 (monorepo-template, stable-context) move to the v2 tag, cut from v2.x. Same defect and same fix as repobuddy/.github#45. Co-Authored-By: Claude Opus 5 --- .github/workflows/bun-release-changeset-oidc.yml | 2 +- .github/workflows/bun-release-changeset.yml | 2 +- .github/workflows/pnpm-release-changeset-oidc.yml | 2 +- .github/workflows/pnpm-release-changeset.yml | 2 +- .github/workflows/yarn-release-changeset-monorepo.yml | 2 +- .github/workflows/yarn-release-changeset.yml | 2 +- .github/workflows/yarn2-library-release.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/bun-release-changeset-oidc.yml b/.github/workflows/bun-release-changeset-oidc.yml index c5c8000..404dc26 100644 --- a/.github/workflows/bun-release-changeset-oidc.yml +++ b/.github/workflows/bun-release-changeset-oidc.yml @@ -94,7 +94,7 @@ jobs: - name: Create Release Pull Request or Publish to npm id: changesets - uses: changesets/action@v2.0.0 + uses: changesets/action@v1 with: commit: 'chore: version packages' version: bun run version diff --git a/.github/workflows/bun-release-changeset.yml b/.github/workflows/bun-release-changeset.yml index 066e772..0949dfe 100644 --- a/.github/workflows/bun-release-changeset.yml +++ b/.github/workflows/bun-release-changeset.yml @@ -57,7 +57,7 @@ jobs: - name: Create Release Pull Request or Publish to npm id: changesets - uses: changesets/action@v2.0.0 + uses: changesets/action@v1 with: commit: 'chore: version packages' version: bun run version diff --git a/.github/workflows/pnpm-release-changeset-oidc.yml b/.github/workflows/pnpm-release-changeset-oidc.yml index 4a3106b..3d83905 100644 --- a/.github/workflows/pnpm-release-changeset-oidc.yml +++ b/.github/workflows/pnpm-release-changeset-oidc.yml @@ -71,7 +71,7 @@ jobs: - name: Create Release Pull Request or Publish to npm id: changesets - uses: changesets/action@v2.0.0 + uses: changesets/action@v1 with: commit: 'chore: version packages' version: pnpm run version diff --git a/.github/workflows/pnpm-release-changeset.yml b/.github/workflows/pnpm-release-changeset.yml index 2350009..37b3b50 100644 --- a/.github/workflows/pnpm-release-changeset.yml +++ b/.github/workflows/pnpm-release-changeset.yml @@ -54,7 +54,7 @@ jobs: - name: Create Release Pull Request or Publish to npm id: changesets - uses: changesets/action@v2.0.0 + uses: changesets/action@v1 with: commit: 'chore: version packages' version: pnpm run version diff --git a/.github/workflows/yarn-release-changeset-monorepo.yml b/.github/workflows/yarn-release-changeset-monorepo.yml index 35d97d2..d1e09f5 100644 --- a/.github/workflows/yarn-release-changeset-monorepo.yml +++ b/.github/workflows/yarn-release-changeset-monorepo.yml @@ -23,7 +23,7 @@ jobs: - name: Create Release Pull Request or Publish to npm id: changesets - uses: changesets/action@v2.0.0 + uses: changesets/action@v1 with: commit: 'chore: version packages' version: yarn version diff --git a/.github/workflows/yarn-release-changeset.yml b/.github/workflows/yarn-release-changeset.yml index dd596f7..5706ede 100644 --- a/.github/workflows/yarn-release-changeset.yml +++ b/.github/workflows/yarn-release-changeset.yml @@ -24,7 +24,7 @@ jobs: - name: Create Release Pull Request or Publish to npm id: changesets - uses: changesets/action@v2.0.0 + uses: changesets/action@v1 with: commit: 'chore: version packages' version: yarn version diff --git a/.github/workflows/yarn2-library-release.yml b/.github/workflows/yarn2-library-release.yml index f94cbbb..e175322 100644 --- a/.github/workflows/yarn2-library-release.yml +++ b/.github/workflows/yarn2-library-release.yml @@ -21,7 +21,7 @@ jobs: - name: Create Release Pull Request or Publish to npm id: changesets - uses: changesets/action@v2.0.0 + uses: changesets/action@v1 # with: # # run `yarn` again to update peer dependency refs # version: yarn changeset version && yarn From d00f46094f16c231fc43baf9939063c756be9fa5 Mon Sep 17 00:00:00 2001 From: unional Date: Wed, 12 Aug 2026 23:38:57 -0700 Subject: [PATCH 2/2] docs: define the two-line tagging scheme This repo has never been tagged and every consumer pins @main, so every change reaches all of them the instant it merges. Combined with Mergify auto-merging Renovate PRs, that is how a changesets/action major broke every changesets consumer at once with no human in the loop. Adopt semver tags plus a moving major alias, and split the changesets workflows into two lines, because changesets/action and @changesets/cli are a matched pair the action validates at runtime: v1 (main) -> changesets/action@v1 -> @changesets/cli v2 v2 (v2.x) -> changesets/action@v2 -> @changesets/cli v3 Consumers pick a tag by their CLI major, not by recency. Mirrors repobuddy/.github's scheme; the two repos share these workflows and should not diverge on how they are versioned. Co-Authored-By: Claude Opus 5 --- README.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/README.md b/README.md index fd55835..11ac116 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,76 @@ Use the workflow templates to create workflows for each repository. +## Versioning + +### Which ref to pin + +**Pin a tag, never `@main`.** For the changesets release workflows, which tag +depends on one thing — the major of `@changesets/cli` in your repo: + +| Your `@changesets/cli` | Pin | Because | +| --- | --- | --- | +| v2 | `@v1` | `*-release-changeset*.yml` uses `changesets/action@v1` | +| v3 | `@v2` | `*-release-changeset*.yml` uses `changesets/action@v2` | + +```yaml +jobs: + release: + uses: unional/.github/.github/workflows/pnpm-release-changeset.yml@v1 +``` + +If you do not use those workflows, either tag works — every other workflow is +byte-identical across the two. + +`v1` and `v2` are *moving* tags, re-pointed forward on each backward-compatible +release within their line and never moved across a breaking change. Pin an exact +version (`@v1.0.0`) if you want a ref that never moves, and accept bumping it by +hand. + +Do **not** pin `@main`: every consumer on it takes every change the instant it +merges, including breaking ones nobody reviewed. + +### Why there are two lines + +`changesets/action` and `@changesets/cli` are strictly paired, and the action +enforces it at runtime: + +| `changesets/action` | works with | inputs | +| --- | --- | --- | +| `v1` | `@changesets/cli` v2 | `version`, `publish`, `commit` | +| `v2` | `@changesets/cli` v3 | `version-script`, `publish-script`, `commit-message` | + +Run v2 against CLI v2 and it aborts: *"Changesets CLI v2 is not supported; use +Changesets action v1 instead."* No single workflow serves both. + +Consumers are split across both majors, so the lines run in parallel rather than +one being a deadline. Eleven consumers of `pnpm-release-changeset.yml` are on CLI +v2 (`@v1`); `monorepo-template` and `stable-context` are on v3 (`@v2`). + +**Branch layout:** `main` is the v1 line; the v2 line lives on `v2.x`. A fix that +applies to both is made on `main` and cherry-picked. When the last consumer +reaches CLI v3, `v2.x` merges down and the v1 line retires. + +### Why this exists + +`.mergify.yml` auto-merges Renovate PRs, so bumps to the actions these workflows +call land on `main` with no human in the loop — and under `@main` they reach +every consumer immediately. That is not hypothetical: `changesets/action` v1 → v2 +was auto-merged and broke the release path of every changesets consumer at once. +Tagging means such a bump lands on `main` and waits until someone cuts a release. + +### Cutting a release + +```sh +git checkout main && git pull +git tag -a v1.0.0 -m "v1.0.0" && git push origin v1.0.0 +gh release create v1.0.0 --generate-notes +git tag -f v1 v1.0.0 && git push -f origin v1 +``` + +Same from `v2.x` with `v2.0.0` / `v2`. Forgetting the last step makes the release +invisible to everyone pinning the alias. + [`.gitignore` for yarn](https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored) ## migrate to yarn PnP