Skip to content

ci: switch npm publish to OIDC trusted publishing - #110

Merged
mulhamna merged 2 commits into
mainfrom
ci/npm-publish-oidc
Aug 13, 2026
Merged

ci: switch npm publish to OIDC trusted publishing#110
mulhamna merged 2 commits into
mainfrom
ci/npm-publish-oidc

Conversation

@mulhamna

Copy link
Copy Markdown
Owner

Summary

  • Replace long-lived NPM_TOKEN secret with npm's OIDC trusted publishing
  • Add provenance attestation to the published package

Changes

  • .github/workflows/npm-publish.yml: add id-token: write permission, drop NODE_AUTH_TOKEN env, publish with --provenance

Test plan

  • npm trusted publisher configured on npmjs.com for @mulham28/pkgmap → repo mulhamna/pkgmap, workflow npm-publish.yml
  • Next push to main triggers publish successfully without NPM_TOKEN
  • NPM_TOKEN secret removed from repo settings after first successful OIDC publish

NPM_TOKEN secret was long-lived and required manual rotation. npm
trusted publishing lets GitHub Actions authenticate via short-lived
OIDC tokens and attaches provenance automatically, so the workflow no
longer needs a stored secret.
npm audit flagged GHSA-rgw5-rvv9-x895 on the transitive
brace-expansion dep, failing the Dependency audit CI job.
@mulhamna
mulhamna merged commit ad41557 into main Aug 13, 2026
4 checks passed
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