Skip to content

ci: publish via npm OIDC trusted publishing - #87

Merged
spinlud merged 1 commit into
v13from
ci/trusted-publishing
Sep 10, 2026
Merged

spinlud merged 1 commit into
v13from
ci/trusted-publishing

Conversation

@spinlud

@spinlud spinlud commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Summary

Switches the CI publish job to npm OIDC trusted publishing, replacing the broken token auth.

  • The workflow authenticated with secrets.NPM_TOKEN, but the repo's configured secret was named NPM_PUBLISH_TOKEN — so secrets.NPM_TOKEN resolved empty and any tag-triggered publish would have failed auth (401/403). OIDC removes the token entirely, fixing this.
  • A trusted publisher is configured on npmjs.com for spinlud/sequelize-typescript-generator + ci.yml (permissions: npm publish, npm stage publish).

Changes (.github/workflows/ci.yml, publish job)

  • Added a step 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.
  • Removed the env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} block from the Publish step.

Unchanged: permissions: id-token: write + contents: read, registry-url, --provenance --access public, the needs: matrix gating, and the tag-name → dist-tag logic (- in the tag → next, otherwise latest).

Notes

  • Must land on v13 before cutting v13.0.0-beta.3, since GitHub Actions runs the workflow file as it exists at the tagged commit.
  • Follow-up (owner): after a verified OIDC publish, set the package's Publishing access to the most restrictive option and delete the stale NPM_PUBLISH_TOKEN secret.

🤖 Generated with Claude Code

https://claude.ai/code/session_01U3gCAgPV4D27TwecuqbBX1

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
@spinlud
spinlud merged commit 65702a3 into v13 Sep 10, 2026
9 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