Repository navigation
chore(ci): run releases in the npm-release environment - #3443
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.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Size Change: -114 B (-0.01%) Total Size: 1.09 MB π¦ View Changed
βΉοΈ View Unchanged
|
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3443 +/- ##
=======================================
Coverage 90.64% 90.64%
=======================================
Files 640 640
Lines 21002 21002
Branches 6621 6621
=======================================
Hits 19037 19037
Misses 1965 1965 β View full report in Codecov by Harness. π New features to boost your workflow:
|
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.