ci(release): publish to npm with trusted publishing (OIDC) - #130
Merged
Merged
Conversation
The v0.10.0-next.0 release failed at `npm publish` with E404 on the PUT. The runner had npm 10.9.8, which has no OIDC support, and the NPM_TOKEN secret is no longer the publishing path. Use Node 24.x (bundles npm >= 11.5.1), drop NODE_AUTH_TOKEN from the publish step so npm authenticates through the trusted publisher configured for this repo and release.yml, and update CONTRIBUTING accordingly.
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.
The
v0.10.0-next.0release run failed atnpm publishwithE404on the PUT, after every gate (typecheck, tests, build, integration smoke) had passed. The runner had npm 10.9.8, which has no OIDC support.Change
release.yml:node-version22.x -> 24.x (latest 24.x is v24.21.0, bundling npm 11.19.0; OIDC needs npm >= 11.5.1).release.yml: removeNODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}from the publish step.id-token: write,--provenance, the idempotent already-published skip and the tag/version gate are unchanged.CONTRIBUTING.md: document trusted publishing, drop theNPM_TOKENrow.Depends on a trusted publisher on npmjs.com for
stablekernel/opencode-cursor, workflowrelease.yml, allowingnpm publish(set up per the maintainer). I can't see that setting; the first publish after this merges is what proves it.Not changed:
cache: npmin setup-node (npm's docs advise against caching in release builds). Low risk here because PR caches cannot reach tag-ref runs andnpm civerifies lockfile hashes; left alone to keep this diff to the publish fix.