ci(release): finish migrating npm publish to trusted publishing - #77
Merged
Conversation
…configured pnpm >= the version fixing pnpm/pnpm#11495 already prioritizes OIDC trusted publishing over a static _authToken, and every package here already has publishConfig.access/provenance and the matching npm Trusted Publisher set up. Keeping NODE_AUTH_TOKEN around only kept a long-lived npm secret alive for no benefit.
Node 24's bundled npm can still land below 11.5.1 depending on the patch actions/setup-node resolves, which is the minimum required for trusted publishing. Add an explicit npm upgrade before both publish steps, and document the already-configured trusted publisher setup in .changeset/README.md now that NPM_PUBLISH_TOKEN is fully retired.
changeset publish resolves the pnpm lockfile and shells out to `pnpm publish` (see changesets/changesets getPublishTool.ts), so the globally installed npm binary this step upgraded is never invoked for the actual publish. pnpm has its own OIDC trusted-publishing exchange, independent of the npm CLI version, so the step and its rationale comment were dead weight.
AGENTS.md still told contributors that releases authenticate to npm via NPM_PUBLISH_TOKEN, but that secret's job is now done by OIDC trusted publishing (see .changeset/README.md). Flagged by Greptile on PR #77 as conflicting guidance.
There was a problem hiding this comment.
Greptile has paused reviews on this repository — it used its 100 free open-source review credits for this billing period. Reviews resume automatically on September 27. To continue before then, an organization admin can keep reviews running past the free credits — those bill as normal usage.
commit: |
Member
Author
|
@greptile review |
Member
Author
|
Resolving the two open threads from the last review — both underlying issues are fixed on this branch:
Note for whoever picks this up next: Greptile is currently paused on this repo (out of free review credits until Sept 27), so no fresh confidence score is available — flagging in case a maintainer wants to enable paid usage or re-review manually before merging. |
This was referenced Sep 6, 2026
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.
🔗 Linked issue
N/A — no tracking issue, this came out of a review of the release workflow's npm publishing setup.
🧭 Context
The npm Trusted Publisher is now configured on npmjs.com for all 4
@wolfstar/*packages.release.ymlalready had everything else trusted publishing (OIDC) needs:id-token: writeon both thesnapshotandreleasejobs,registry-urlonactions/setup-node, and every package'spackage.jsonalready carries the matchingrepositoryfield pluspublishConfig.access: "public"/publishConfig.provenance: true.The only thing left over was
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}in both jobs — a long-lived npm token kept as a standing secret for no benefit.changeset publishshells out topnpm publishfor this workspace (confirmed againstgetPublishTool.tsinchangesets/changesets), and pnpm (since pnpm/pnpm#11495, included in thepnpm@11.24.0this repo pins) always attempts OIDC first and only falls back to a static_authTokenwhen trusted publishing isn't applicable. With the Trusted Publisher now set up, the token was never going to be used.📚 Description
NODE_AUTH_TOKENfrom thesnapshotandreleasejobs' publish steps;NPM_CONFIG_PROVENANCE/publishConfig.provenancestill cover provenance independently of the auth method.npm install -g npm@lateststep to both jobs to "guarantee" the npm CLI version. Removed it again:changeset publishnever invokes thenpmbinary here (it callspnpm publish), and pnpm's OIDC exchange is its own implementation, independent of the globally installed npm CLI version — the step had no effect on the actual publish and its comment was misleading..changeset/README.md's setup/troubleshooting sections to describe the trusted-publisher configuration instead of the retiredNPM_PUBLISH_TOKENsecret, including the steps to add a new package to it and a note on a known upstream npm CLI bug (npm/cli#8976) affecting multi-package OIDC publishes.AGENTS.md, which still told contributors that releases authenticate viaNPM_PUBLISH_TOKEN.No behavior change is expected: publishing keeps working the same way, just authenticated via OIDC trusted publishing instead of a static token that pnpm was already bypassing.
Key changes
.github/workflows/release.ymlNODE_AUTH_TOKENfrom both publish jobs (no npm CLI version bump needed).changeset/README.mdNPM_PUBLISH_TOKENsecret docs with trusted-publisher setup/troubleshooting instructionsAGENTS.mdNPM_PUBLISH_TOKENsecretOnce a release confirms the OIDC flow end-to-end, the
NPM_PUBLISH_TOKENsecret itself can be deleted from repo/org settings.Type of Change
Pre-flight Checklist
.changeset/README.md,AGENTS.md)Confidence Score: 5/5
Safe to merge.
Both prior comments are fully fixed in the current code:
AGENTS.mdnow documents OIDC trusted publishing instead ofNPM_PUBLISH_TOKEN, and the release workflow no longer installs the mutablenpm@latesttag.Reviews (2): Last reviewed commit: "docs(agents): stop pointing at the retir..." | Re-trigger Greptile