This repository was archived by the owner on Sep 23, 2026. It is now read-only.
Repository navigation
Switch publish workflow to npm Trusted Publishing - #26
Merged
Merged
Conversation
Replaces the NPM_TOKEN-secret approach from the previous PR with npm's OIDC-based Trusted Publishing: the package's Settings -> Trusted Publisher on npmjs.com now trusts this exact repo + workflow filename, so the workflow mints a short-lived, run-scoped publish credential via id-token: write instead of relying on a long-lived stored secret. Also upgrades npm to latest in the job before publishing, since Node 22's bundled npm predates OIDC trusted-publishing support. Claude-Session: https://claude.ai/code/session_01B2mbssSNDiu8GpKjaCFRn1 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Follow-up to #25 (merged): replaces the
NPM_TOKEN-secret approach with npm's newer OIDC-based Trusted Publishing, per the maintainer's request. No long-lived secret is stored at all — the package's Settings → Trusted Publisher page on npmjs.com is now configured to trust this exact repo and workflow filename (publish.yml), and each run mints a short-lived, run-scoped publish credential viaid-token: write.Changes
publish.yml: addspermissions: { contents: read, id-token: write }at the job level, drops theNODE_AUTH_TOKEN/secrets.NPM_TOKENenv entirely, and upgrades npm to latest before publishing (Node 22's bundled npm predates OIDC trusted-publishing support).NPM_TOKENsecret.Verification
pnpm install,pnpm lint,pnpm run build,pnpm test(105 passing) all green locally. The OIDC exchange itself can only be exercised by an actual push tomain, since GitHub only issues the OIDC token in that real workflow context — but the trusted-publisher config is already in place on npmjs.com per the maintainer.https://claude.ai/code/session_01B2mbssSNDiu8GpKjaCFRn1
Generated by Claude Code