Repository navigation
ci: publish via npm OIDC trusted publishing - #87
Merged
Merged
Conversation
Switch the publish job from NPM_TOKEN auth to OIDC trusted publishing. Upgrade npm to latest before publishing, since the pinned Node 22.13 ships npm 10.x while OIDC requires npm >= 11.5.1, and drop the NODE_AUTH_TOKEN env from the Publish step. The job already sets id-token: write and --provenance, and a trusted publisher is configured on npmjs.com for this repo and ci.yml. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U3gCAgPV4D27TwecuqbBX1
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
Switches the CI
publishjob to npm OIDC trusted publishing, replacing the broken token auth.secrets.NPM_TOKEN, but the repo's configured secret was namedNPM_PUBLISH_TOKEN— sosecrets.NPM_TOKENresolved empty and any tag-triggered publish would have failed auth (401/403). OIDC removes the token entirely, fixing this.spinlud/sequelize-typescript-generator+ci.yml(permissions:npm publish,npm stage publish).Changes (
.github/workflows/ci.yml,publishjob)Upgrade npm for trusted publishing(npm install -g npm@latest) — OIDC trusted publishing requires npm ≥ 11.5.1, but the pinned Node 22.13 ships npm 10.x.env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}block from the Publish step.Unchanged:
permissions: id-token: write+contents: read,registry-url,--provenance --access public, theneeds:matrix gating, and the tag-name → dist-tag logic (-in the tag →next, otherwiselatest).Notes
v13before cuttingv13.0.0-beta.3, since GitHub Actions runs the workflow file as it exists at the tagged commit.NPM_PUBLISH_TOKENsecret.🤖 Generated with Claude Code
https://claude.ai/code/session_01U3gCAgPV4D27TwecuqbBX1