Repository navigation
ci: publish to npm via trusted publishing (OIDC) - #74
Merged
Merged
Conversation
- grant id-token: write so semantic-release can use OIDC - grant contents/issues/pull-requests write for semantic-release/git and github - drop NPM_TOKEN from the workflows and remove the repo .npmrc - migrate the alpha workflow to OIDC and replace deprecated set-output Co-Authored-By: Claude <noreply@anthropic.com>
|
🎉 This PR is included in version 1.2.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Why
The last release run failed with
EINVALIDNPMTOKEN(401 on/-/whoami). The storedNPM_TOKENwas a classic token, and npm permanently revoked all classic tokens on 2025-12-09; granular write tokens also have a 90-day max lifetime. The run also showed semantic-release attempting OIDC first but failing because the workflow never grantedid-token: write.This switches publishing to npm Trusted Publishing.
Changes
permissions:contents: write,issues: write,pull-requests: write,id-token: writeNPM_TOKENfrom the release stepcontents: read+id-token: write, removeNPM_TOKEN/GITHUB_TOKEN::set-outputsyntax with$GITHUB_OUTPUT.npmrc— it only contained//registry.npmjs.org/:_authToken=${NPM_TOKEN}, which is no longer needed and would resolve to an empty token without the secret.cmseguinrollup-plugin-react-scoped-cssrelease.yml(filename only)npm publish— for configs created after 2026-09-03, onlynpm stage publishis allowed by default, so this must be selected explicitlyrelease-alpha.yml.NPM_TOKENrepository secret.id-token: write. The merge push will run the new workflow; semantic-release will also pick up the unreleasedfix:from fix: correct docs and package metadata #72 and publish it.Verification
NPM_TOKEN/.npmrcreferences in the repoSources: npm classic tokens revoked, npm trusted publishing docs, @semantic-release/npm trusted publishing docs
🤖 Generated with Claude Code