fix: publish via npm trusted publisher (OIDC) - #261
Merged
Merged
Conversation
Replaces the NPM_TOKEN-based cycjimmy/semantic-release-action with a GitHub App token (to push the release commit past branch protection) and an explicit `npm publish` step authenticated via OIDC trusted publishing.
allanbowe
approved these changes
Jul 21, 2026
|
🎉 This PR is included in version 3.5.9 🎉 The release is available on GitHub release 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.
Issue
sasjs/utilspublishes to npm viacycjimmy/semantic-release-actionauthenticated with a long-livedNPM_TOKENsecret. Long-lived publish tokens are a standing credential-leak risk.Intent
Publish to npm using short-lived OIDC credentials instead of a static
NPM_TOKEN, while keeping the same semantic-release versioning/changelog behavior.Implementation
.github/workflows/publish.yml: replaced thecycjimmy/semantic-release-actionstep with a directnpx semantic-releasecall, and added an explicitnpm publish --access publicstep that authenticates via OIDC (id-token: writepermission, npm upgraded to latest since Node 22 ships npm 10.x and trusted publishing needs ≥ 11.5.1). A short-lived GitHub App token (secrets.APP_ID/APP_PRIVATE_KEY) is minted per run to check out the repo and push semantic-release's version-bump commit past branch protection, replacingsecrets.GITHUB_TOKEN.package.json: expanded thereleaseconfig from a barebrancheslist to the explicit plugin pipeline (commit-analyzer,release-notes-generator,execto bump the version,gitto commitpackage.json/package-lock.jsonback,githubfor release notes) — the same pipelinecycjimmy/semantic-release-actionran implicitly, now made explicit sincesemantic-releaseis invoked directly. Addedsemantic-release,@semantic-release/exec, and@semantic-release/gitas devDependencies.Checks
npm run lint:fix).npm test).sasjs-cliunit tests are passing (npm test).Reviewer checks