ci: publish to npm via OIDC trusted publishing#46
Merged
Conversation
Replaces the NPM_TOKEN-based publish (which broke in #44 when the token became invalid) with npm OIDC trusted publishing, matching the etchteam/eslint setup. - Drop NPM_TOKEN; add id-token: write permission for OIDC - Bump semantic-release 19.x -> 25.0.1 for @semantic-release/npm >= 13.1.0 - Add setup-node + registry-url; pin action SHAs - Bump .nvmrc 22 -> 24 for npm >= 11.5.1 (required by OIDC) Closes #44
JoshTheWanderer
requested changes
Jun 25, 2026
Co-authored-by: Josh Rose <1677846+JoshTheWanderer@users.noreply.github.com>
Co-authored-by: Josh Rose <1677846+JoshTheWanderer@users.noreply.github.com>
JoshTheWanderer
approved these changes
Jun 25, 2026
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



What
Replaces the
NPM_TOKEN-based npm publish with npm OIDC trusted publishing, matching the etchteam/eslint setup.Why
The release in #44 failed because the
NPM_TOKENsecret was invalid/expired. Trusted publishing removes the long-lived token entirely — GitHub Actions mints a short-lived OIDC token at runtime that npm verifies against the registered trusted publisher. No secret to expire, rotate, or leak, and provenance attestations are added automatically.Changes
.github/workflows/publish.ymlNPM_TOKEN; addid-token: write(+contents/issues/pull-requests: write) permissions for OIDCsemantic_version19.x → 25.0.1to pull in@semantic-release/npm≥ 13.1.0 (first version with OIDC support)setup-nodewithnode-version-file: .nvmrc+registry-url; pin action SHAs (matches eslint).nvmrc:22 → 24— OIDC requires npm ≥ 11.5.1, which ships with Node 24 (Node 22 ships npm 10.x).Required setup (done)
The npm package's trusted publisher has been configured (npmjs.com → package Settings → Trusted Publisher → GitHub Actions:
etchteam/stylelint, workflowpublish.yml).After merge, the next release on
mainpublishes via OIDC. The now-unusedNPM_TOKENrepo secret can be deleted.Closes #44