ci: migrate npm publish to trusted publishing (OIDC)#16
Merged
Conversation
The v0.2.2 publish failed with E404: the NPM_TOKEN secret had expired (npm granular tokens default to 30-day expiry). Replace token auth with npm trusted publishing, configured for this repo/workflow on npmjs.com: - Upgrade npm in the workflow: OIDC auth requires npm >= 11.5.1, while Node 22 bundles npm 10.x. - Drop NODE_AUTH_TOKEN and the --provenance flag; with trusted publishing, auth comes from the GitHub OIDC token and provenance is generated automatically. - Drop publishConfig.provenance for the same reason. - Disable dependency caching in the release build per npm's guidance (cache: npm removed, package-manager-cache: false). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
npm publishwith E404 — theNPM_TOKENsecret expired (npm granular tokens default to 30-day expiry; last publish was May 5). Trusted publishing is now configured on npmjs.com for this repo +publish.yml, removing the need for long-lived tokens.NODE_AUTH_TOKENand--provenance(auth and provenance are automatic with trusted publishing), disable dependency caching in the release build per npm docs.publishConfig.provenanceremoved from package.json for the same reason (access: publickept).Test plan
v0.2.2tag after merge — the publish workflow run on the tag is the real verification🤖 Generated with Claude Code