Skip to content

ci: publish to npm via trusted publishing (OIDC) - #5

Merged
toocool merged 1 commit into
mainfrom
ci/npm-trusted-publishing
Oct 17, 2026
Merged

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

Conversation

@toocool

@toocool toocool commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Switches the release workflow from a long-lived NPM_TOKEN secret to npm trusted publishing via GitHub OIDC.

  • publish job gets id-token: write (and drops to contents: read)
  • Node 24 for the publish job — trusted publishing needs npm >= 11.5.1
  • NODE_AUTH_TOKEN removed from the publish step
  • Releases now carry npm provenance automatically

The trusted publisher (apinator-io / this repo / release.yml) is already configured on npmjs.com.

After the first release publishes successfully this way: set the package to "Require 2FA and disallow tokens" on npmjs.com, revoke the old token, and delete the NPM_TOKEN repo secret.

Replace the NPM_TOKEN secret with GitHub OIDC trusted publishing.
@toocool
toocool merged commit 28b46dc into main Oct 17, 2026
3 checks passed
@toocool toocool mentioned this pull request Oct 17, 2026
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.

2 participants