ci: publish to npm via OIDC trusted publishing (no token)#14
Merged
Conversation
The @pureskillgg npm org enforces 2FA on writes at a tier that rejects token bypass (NPM_TOKEN -> EOTP in CI). Switch the npmjs job to OIDC trusted publishing: workflow permissions id-token: write, upgrade npm to >=11.5, drop NODE_AUTH_TOKEN from the npm job (OIDC handles auth + provenance), add workflow_dispatch. Proven on mw-phi. GitHub Packages + gh-pages jobs unchanged. Requires a one-time Trusted Publisher on the npmjs package. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Switches the npmjs publish job to OIDC trusted publishing (no token, immune to the org's 2FA-on-writes, adds provenance). Proven on
mw-phi(@pureskillgg/phi@6.0.2published via OIDC).Add the one-time Trusted Publisher on npmjs: package
@pureskillgg/docs→ Settings → Trusted Publisher → GitHub Actions →pureskillgg/docs, workflowpublish.yml.Changes: workflow
permissions: id-token: write,npm install -g npm@latest(OIDC needs npm ≥11.5), dropNODE_AUTH_TOKENfrom the npm job, addworkflow_dispatch. GitHub Packages + gh-pages jobs unchanged.🤖 Generated with Claude Code