Repository navigation
fix(release): publish via npm trusted publishing (OIDC) - #126
Merged
Merged
Conversation
Upgrade semantic-release to v25 (@semantic-release/npm 13) for OIDC trusted publishing with provenance, move workflows to Node 22 and v4 actions, use GITHUB_TOKEN and drop NPM_TOKEN.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
🎉 This PR is included in version 4.0.3 🎉 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.
Fixes the failed release (
SemanticReleaseError: Invalid npm token, run 39901074004) by switching to npm Trusted Publishing (GitHub Actions OIDC). NoNPM_TOKENneeded.Changes
semantic-release^17.4.7 → ^25.0.9 (brings@semantic-release/npm13.x with OIDC trusted publishing; requires Node ^22.14 || >=24.10).release.yml: checkout/setup-node v4, Node 22,registry-url: https://registry.npmjs.org,npm install -g npm@latest(trusted publishing needs npm >= 11.5.1), job permissionscontents/issues/pull-requests: write+id-token: write, usessecrets.GITHUB_TOKEN,NPM_TOKENremoved,fetch-depth: 0.ci.yml: v4 actions, Node 22,--frozen-lockfile.package.json:publishConfig: { access: public, provenance: true }(provenance is automatic with trusted publishing anyway).repositoryalready matchesgithub.com/zotoio/launchdarkly-nodeutils.yarn build/yarn testpass locally on Node 22 (51 passing).Required npmjs setup BEFORE merging (merge triggers a release)
npmjs.com → package
launchdarkly-nodeutils→ Settings → Trusted Publisher → GitHub Actions:zotoiolaunchdarkly-nodeutilsrelease.ymlOptional hardening afterwards: Settings → Publishing access → "Require two-factor authentication and disallow tokens".
After a successful trusted release, the
NPM_TOKEN(andGH_TOKEN) repo secrets can be deleted and the npm token revoked.Note: if master has branch protection that blocks the
GITHUB_TOKENfrom pushing tags, it still works because semantic-release's default config only pushes tags (no commits to master).