ci: switch npm publish to Trusted Publisher OIDC (no NPM_TOKEN) - #35
Merged
Conversation
- release-node.yml: add id-token:write, remove NPM_TOKEN env from both publish steps, add --provenance to all npm publish commands - release-wasm.yml: add id-token:write, remove NPM_TOKEN env from npm publish step, add --provenance and provenance:true in publishConfig - docs/07-cicd-publishing.md: document Trusted Publisher setup for both edgeparse and edgeparse-wasm packages; mark NPM_TOKEN as fallback-only; add per-package Trusted Publisher configuration table and step-by-step guide for edgeparse-wasm first-publish scenario
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
Migrates both npm publish workflows from token-based auth to npm Trusted Publisher (OIDC) — eliminating the
NPM_TOKENsecret dependency for routine releases.Changes
.github/workflows/release-node.ymlid-token: writepermission, removeNODE_AUTH_TOKENenv from both publish steps, add--provenance.github/workflows/release-wasm.ymlid-token: writepermission, removeNODE_AUTH_TOKENenv from npm publish step, add--provenance+provenance: truein publishConfigdocs/07-cicd-publishing.mdNPM_TOKENas fallback-only; add Trusted Publisher setup guide foredgeparseandedgeparse-wasm; add step-by-step first-publish instructions for WASM packageHow Trusted Publisher works
id-token: write)npm publish --provenanceexchanges the OIDC token with npmjs.com for a short-lived session tokenNPM_TOKENsecret needed — provenance attestation is attached automaticallyUser action required
Configure Trusted Publisher for
edgeparse-wasmon npmjs.com once the package exists: