Skip to content

ci: switch npm publish to Trusted Publisher OIDC (no NPM_TOKEN) - #35

Merged
raphaelmansuy merged 1 commit into
mainfrom
ci/trusted-publisher-oidc
Apr 13, 2026
Merged

ci: switch npm publish to Trusted Publisher OIDC (no NPM_TOKEN)#35
raphaelmansuy merged 1 commit into
mainfrom
ci/trusted-publisher-oidc

Conversation

@raphaelmansuy

Copy link
Copy Markdown
Owner

Summary

Migrates both npm publish workflows from token-based auth to npm Trusted Publisher (OIDC) — eliminating the NPM_TOKEN secret dependency for routine releases.

Changes

File Change
.github/workflows/release-node.yml Add id-token: write permission, remove NODE_AUTH_TOKEN env from both publish steps, add --provenance
.github/workflows/release-wasm.yml Add id-token: write permission, remove NODE_AUTH_TOKEN env from npm publish step, add --provenance + provenance: true in publishConfig
docs/07-cicd-publishing.md Mark NPM_TOKEN as fallback-only; add Trusted Publisher setup guide for edgeparse and edgeparse-wasm; add step-by-step first-publish instructions for WASM package

How Trusted Publisher works

  1. GitHub Actions mints an OIDC token (id-token: write)
  2. npm publish --provenance exchanges the OIDC token with npmjs.com for a short-lived session token
  3. No NPM_TOKEN secret needed — provenance attestation is attached automatically

User action required

Configure Trusted Publisher for edgeparse-wasm on npmjs.com once the package exists:

npmjs.com → edgeparse-wasm → Settings → Trusted Publisher
Workflow: release-wasm.yml

- 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
@raphaelmansuy
raphaelmansuy merged commit 0cba356 into main Apr 13, 2026
4 of 8 checks passed
@raphaelmansuy
raphaelmansuy deleted the ci/trusted-publisher-oidc branch April 13, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant