Skip to content

ci(release): publish to npm with trusted publishing instead of a token - #380

Merged
willgosnold merged 1 commit into
mainfrom
ci/npm-trusted-publishing
Oct 27, 2026
Merged

willgosnold merged 1 commit into
mainfrom
ci/npm-trusted-publishing

Conversation

@willgosnold

Copy link
Copy Markdown
Owner

The npm publish job authenticates with the job's GitHub OIDC token (npm trusted publishing) instead of the NPM_TOKEN secret.

  • Drops NODE_AUTH_TOKEN, so no npm token is used.
  • Drops --provenance, which trusted publishing adds automatically.
  • Fails early if the runner's npm is older than 11.5.1, the first release that supports it.

Already in place, per https://docs.npmjs.com/trusted-publishers: Node 24, id-token: write on the job, GitHub-hosted runner, and repository.url matching this repo on all 8 packages.

Before the next v* tag: each @PatchBook package needs a trusted publisher for willgosnold/patchbook, release.yml, with publish allowed. Merging this alone publishes nothing, because releases only run on tag push.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@willgosnold
willgosnold merged commit 2c57968 into main Oct 27, 2026
6 checks passed
@willgosnold
willgosnold deleted the ci/npm-trusted-publishing branch October 27, 2026 16:44
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