fix(pnpm-release-changeset): use changesets/action v2 input names, and put the shared workflows on tags - #44
fix(pnpm-release-changeset): use changesets/action v2 input names, and put the shared workflows on tags#44unional wants to merge 2 commits into
Conversation
The workflow pins changesets/action@v2.0.0 but passed v1 input names. Actions ignores unknown `with:` keys, so `publish-script` was never set and the action only ever opened a version PR — nothing was published to npm, and the job still went green. Verified against changesets/action@v2.0.0's own action.yml: version -> version-script publish -> publish-script commit -> commit-message Also pass the custom token as the `github-token` input. v2 defaults `push-with-git-cli` to false, so it pushes release commits and tags via the GitHub API using that input; supplying CI_GITHUB_TOKEN only as the GITHUB_TOKEN env var meant the custom token was ignored. Raise the job to `contents: write`, required to push those commits and tags. `id-token: write` is kept for npm OIDC trusted publishing. Refs: #43
This repo has never been tagged and every consumer pins @main, so every change reaches all of them the instant it merges — including breaking ones nobody reviewed. That is how #43 reached four repos. Adopt semver tags plus a moving major alias (v1.0.0 immutable, v1 re-pointed on each compatible release). Consumers pin @v1. Documents the decisions and their justification: why v1.0.0 rather than v0.x (a moving v0 alias would carry breaking changes by semver's own rules), why one tag covers all eight workflows plus the composite action, what counts as breaking, and the manual release procedure. Also records three findings from verifying the scheme: - .mergify.yml auto-merged the changesets/action v1->v2 major (PR #42). Its `head~=^(?!major-)` guard expects a branch prefix Renovate does not produce here, so majors merge unreviewed. - Renovate will bump tagged `uses:` refs — the org preset restricts no managers — but a moving @v1 alias produces no update PRs by design. - pnpm-verify.yml and pnpm-release-changeset.yml reference this repo's own setup-playwright@main, so a @v1 pin still leaks to main. Cannot be fixed before v1 exists; recorded as a known gap with its remedy.
|
Tick the box to add this pull request to the merge queue (same as
|
|
Superseded by #45, which carries this branch's input fix and README forward. The correction: this PR applied the #45 splits the two instead — Your README is largely intact there; the changes are the pin-by-CLI-major table, the two-line branch layout, the OIDC section, and the release procedure covering both lines. |
Fixes the silently-broken changesets release path from #43, and puts this repo on tags so the next fix to a shared release path lands behind a version consumers opt into.
Two commits, two concerns.
1.
fix(pnpm-release-changeset)— the #43 defectThe workflow pins
changesets/action@v2.0.0but passed v1 input names. Actions ignores unknownwith:keys, sopublish-scriptwas never set: the action only ever opened a version PR, nothing was published to npm, and the job went green.version:version-script:publish:publish-script:commit:commit-message:Plus the two secondary defects the issue records: the custom token is now passed as the
github-tokeninput (v2 defaultspush-with-git-cli: false, so it pushes commits and tags through the GitHub API using that input — theGITHUB_TOKENenv var is not read), andpermissionsis raised tocontents: write, which that push requires.id-token: writeis kept for npm OIDC.What I verified, and how
action.ymlat the pinned tag, not from the issue:gh api "repos/changesets/action/contents/action.yml?ref=v2.0.0". All four ofgithub-token,publish-script,version-script,commit-messageexist as named;push-with-git-clidoes default tofalse. Confirmed independently by the v2.0.0 release notes (Update to changesets v3 packages changesets/action#673, #674, #695).actionlintpasses — but this is worth nothing as evidence, and I want to be explicit about that rather than let a green check imply verification. I ran it against the original broken file as a control and it passed that too, exit 0. actionlint does not validate third-party action input names. That is precisely why this bug survived review. Theaction.ymlread is the only real check here.What remains unproven
These workflows only execute on a real release, so I could not run this.
CHANGESETS_OUTPUTplumbing. v2.0.0 (Expect publish output to be shared through a file changesets/action#678) replaced stdout parsing with a shared output file, and states theCHANGESETS_OUTPUTenv var "should always be passed down to the Changesets CLI invocations" when using custom scripts. We use custom scripts (pnpm run version/pnpm run release). It should be inherited by the child process normally, but I have not proven it. If it is not, Allow custom publish scripts to complete without a Changesets output file changesets/action#697 says the publish still completes while GitHub releases and git tags are not created, and thepublishedoutput this workflow exposes would be wrong —visual-testing'srelease.ymlgates its docs job on exactly that output..npmrcheredoc is now dead code and slightly broken (no closingEOF, leading whitespace, and the step setsNPM_TOKEN: ''). Remove npm auth handling in favor of docs changesets/action#695 removed.npmrchandling entirely in favour of Trusted Publishing. Left alone — separate concern, but it should be cleaned up.2.
docs— the tagging schemeConsumers pin
@v1. Semver tags plus a moving major alias, re-pointed on each compatible release;v1.0.0immutable. Rationale, thev0.x-vs-v1.0.0call, what one tag covers, what counts as breaking, and the release procedure are all in the README.The short version of the judgment calls:
v1.0.0, notv0.x. The moving-major-alias convention is only coherent at>= 1— under semver,0.xminors may break, so a movingv0would auto-deliver breaking changes, which is the exact failure being fixed.v1does give back some instant propagation. Accepted knowingly:@mainpropagates everything including unreviewed breaking changes;@v1propagates only what a maintainer judged compatible. Repos wanting zero drift can pin@v1.0.0.setup-playwright. A change to any one bumps the tag for everyone. That churn is noise, not risk.Findings from verifying the scheme
The root cause is upstream of #43 and is still live.
.mergify.ymlauto-merges Renovate PRs. The v1→v2 major arrived as #42 on branchrenovate/changesets-action-2.xand auto-merged at 00:58Z on 2026-08-12 — the Mergify guardhead~=^(?!major-)expects amajor-prefix that Renovate does not produce here, so a major merged like a patch and reached every consumer instantly. Tagging fixes the consumer half; the Mergify rule is a separate defect and should be fixed on its own.Renovate will keep tag pins current. The org preset (
unional/renovate-preset) is justconfig:base+:preserveSemverRanges— noenabledManagers, nothing disablinggithub-actions. So pins will not go stale. Note that a moving@v1yields no update PRs by design; Renovate only opens one whenv2appears. Dependabot is not a factor — the two configs that exist are npm-only.Known gap, documented not fixed:
pnpm-verify.yml:43andpnpm-release-changeset.yml:42reference this repo's ownsetup-playwright@main. A reusable workflow cannot use a relative path (./resolves against the caller's checkout), so these must be fully qualified — and a consumer pinned@v1still picks that action up frommain. Re-pointing them beforev1exists would break every current consumer, so the README records the remedy to apply when cutting the first tag.Tag to cut after merge
Do not cut from this branch. After this merges to
main:Exact commands are in the README's "Cutting a release". Per the known gap above, consider including the
setup-playwright@main→@v1edit in the tagged commit.Before anyone pins the new tag — read this
The consumer list in circulation was incomplete, and no consumer can adopt this workflow yet.
A full org scan (raw grep of every workflow file in all 16 repos, not just code search) found a fourth consumer that was missed:
repobuddy/jest-watch-toggle-config-2, which usespnpm-release-changeset.ymland is therefore inside the #43 blast radius.repobuddy/visual-testingalso has two moresetup-playwrightreferences than were listed (pull-request.yml,update-snapshot.yml).All four consumers are on
@changesets/cliv2:@changesets/clipnpm-release-changeset.ymlrepobuddy/repobuddy^2.26.0repobuddy/storybook^2.29.7repobuddy/visual-testing^2.29.8repobuddy/jest-watch-toggle-config-2^2.25.2changesets/action@v2.0.0hard-validates this — changesets/action#699 added a check that fails CLI v2 users and directs them tochangesets/action@v1. So every one of the four must upgrade to@changesets/cliv3 before pinningv1for the release workflow.repobuddy/repobuddyis doing so in repobuddy/repobuddy#581 (open; CI red only on a time-based pnpmminimumReleaseAgecheck that self-clears). The other three have no upgrade in flight.To be clear about who broke what: this is not a regression introduced by pinning.
mainalready carrieschangesets/action@v2, so all four are already mismatched today. Pinning does not create the problem; it stops the next one.Migration issues with exact diffs and the CLI-v3 precondition are filed on each consumer repo.
One decision for the Council
I implemented #43 as specified — fix the v2 input names. But given that zero of four consumers can actually use the result, there is a defensible alternative worth an explicit decision rather than a silent default: revert this repo to
changesets/action@v1, ship av1.0.0that every consumer can adopt immediately, and do the action v2 upgrade later asv2.0.0once the consumers are on CLI v3 — which is exactly the opt-in boundary this tagging scheme exists to provide.I did not do that, because it goes beyond what #43 and the mission asked for and is a direction change, not an implementation detail. Flagging it rather than deciding it. As it stands,
v1.0.0's release workflow is correct but unusable until the consumers upgrade.Refs #43