Repository navigation
chore(ci): release in the npm-release environment without stored tokens (release-v13) - #3449
Merged
Merged
Conversation
The release job runs in the npm-release environment, which only master and release-v* may use and which needs a reviewer's approval. Once the npm trusted publisher requires this environment, a release.yml run from any other branch can no longer publish.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Releases publish to npm through OIDC trusted publishing, so the release job no longer passes NPM_TOKEN. Semantic-release pushes the changelog commit, creates the GitHub release and comments on released issues and PRs with the workflow's built-in GITHUB_TOKEN instead of the shared DOCUSAURUS_GH_TOKEN org secret.
oliverlaz
approved these changes
Nov 14, 2026
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.
npm trusted publishing checks the repository and the workflow file name, not the branch. Today anyone with write access could push a branch with their own
release.yml, start it, and publish to npm.This PR runs the release job in the
npm-releaseenvironment. The environment already exists and is set up as follows:masterandrelease-v*only.What changes for releases
masterorrelease-v*and need approval too. A run from any other branch fails before it starts.After merge
On npmjs.com, set Settings → Trusted Publisher → Environment to
npm-releaseforstream-chat-react. From then on npm rejects OIDC tokens from runs outside the environment. Do this only after the same change is merged on every releasing branch (master,release-v9torelease-v14), or releases from a branch without it fail.Stored tokens
This PR also removes the stored tokens from the release job, the same change as #3437 on
masterand #3438 onrelease-v14:NPM_TOKEN. The token has expired, and@semantic-release/npm13 publishes through OIDC first.GITHUB_TOKENis the workflow's built-in token instead of the sharedDOCUSAURUS_GH_TOKEN. The workflow already grantscontents,issuesandpull-requestswrite.