File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7575
7676jobs :
7777 build :
78- # Run on a merged release PR (normal flow) or a manual workflow_dispatch
79- # from main (escape hatch). The main-branch guard on workflow_dispatch
80- # prevents republishing from arbitrary branches.
78+ # Run on a merged release PR (normal flow), a stable manual dispatch from
79+ # main (retry escape hatch), or a prerelease manual dispatch from any
80+ # selected branch. Canary publishes are intentionally branch-scoped so
81+ # maintainers can push a button on feature work without merging first.
8182 if : >
82- (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') ||
83+ (github.event_name == 'workflow_dispatch' &&
84+ (inputs.mode == 'prerelease' || github.ref == 'refs/heads/main')) ||
8385 (github.event.pull_request.merged == true &&
8486 startsWith(github.event.pull_request.head.ref, 'release/publish/'))
8587 runs-on : ubuntu-latest
@@ -182,6 +184,9 @@ jobs:
182184 if : ${{ !cancelled() && needs.build.result == 'success' }}
183185 runs-on : ubuntu-latest
184186 timeout-minutes : 20
187+ # npm trusted publishing is bound to this environment. Its deployment
188+ # branch policy must allow prerelease workflow_dispatch refs; stable
189+ # releases remain main-only via the build job guard.
185190 environment : npm
186191 permissions :
187192 contents : write
You can’t perform that action at this time.
0 commit comments