Skip to content

ci: enable npm OIDC trusted publishing - #73

Draft
PatrickHeneise wants to merge 1 commit into
mainfrom
ci/npm-oidc-trusted-publishing
Draft

ci: enable npm OIDC trusted publishing#73
PatrickHeneise wants to merge 1 commit into
mainfrom
ci/npm-oidc-trusted-publishing

Conversation

@PatrickHeneise

Copy link
Copy Markdown
Member

Summary

  • Adds id-token: write and bumps Node to 24 so @semantic-release/npm can publish via npm OIDC trusted publishing, removing the need for the NPM_TOKEN secret
  • Splits the publish workflow into a read-only test job and a separate publish job that holds the elevated permissions (id-token: write, contents: write, pull-requests: write, etc.), so the OIDC token isn't exposed to npm ci/lint/build against the full dependency tree

Test plan

  • Configure npm trusted publishing for @zentered/issue-forms-body-parser (npm package settings -> Trusted publisher -> GitHub Actions, repo/workflow publish.yml, environment if used)
  • Remove NPM_TOKEN secret once trusted publishing is confirmed working
  • Merge to main and confirm the test job runs with default (read-only) permissions and the publish job runs semantic-release and publishes successfully

🤖 Generated with Claude Code

Splits the workflow into a read-only test job and a separate publish
job that holds id-token, contents, and pull-requests write
permissions. This keeps the OIDC token and write access out of the
job that runs npm ci against the full dependency tree for lint/test/build.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant