ci: harden npm release workflow#3
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR hardens the npm publish/release pipeline by scoping publishing credentials to the live release GitHub Environment, pinning high-trust GitHub Actions to commit SHAs, and documenting the release boundary.
Changes:
- Pin GitHub Actions (
checkout,setup-vp,semantic-release-action) to full commit SHAs and add Dependabot updates for GitHub Actions. - Move npm publishing to run under the
releaseGitHub Environment, disable dependency caching for the release job, and add non-cancellable release concurrency. - Add repo-local documentation describing the distribution/release flow and hardening guidelines.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/DISTRIBUTION.md | Documents the release flow and hardening expectations for npm publishing. |
| AGENTS.md | Links contributors to the distribution/release documentation. |
| .github/workflows/ci.yml | Pins actions, scopes publishing to the release environment, disables cache for release, and tightens concurrency/permissions. |
| .github/dependabot.yml | Enables weekly Dependabot refreshes for pinned GitHub Actions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| timeout-minutes: 15 | ||
| environment: | ||
| name: release | ||
| deployment: false |
|
|
||
| ## Release flow | ||
|
|
||
| Pushes to `main` run the workspace verify job. If verification passes and the commit is not marked `[skip ci]`, the release job targets the `release` GitHub Environment with `deployment: false`, builds the library, and runs semantic-release. |
9d6f7e8 to
c6df0ac
Compare
c6df0ac to
322383c
Compare
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.
Summary
Harden the npm release workflow around the live
releaseGitHub Environment and environment-scopedNPM_TOKEN.Changed
releaseEnvironment.Risks
npm publishing depends on the already-configured
NPM_TOKENenvironment secret.Verification
actionlint .github/workflows/*.ymlgit diff --checkpnpm verifycodex-security:security-scandiff scan: no reportable findingsComplexity
Reduced.