Skip to content

Commit bed747b

Browse files
committed
fix: add GitHub Environment protection to publish/deploy workflows
Add `environment:` declarations to all publish and deploy jobs so that GitHub Environment protection rules (required reviewers, deployment branches, wait timers) can gate package publishing and deploys. - prerelease.yml publish → environment: npm - publish-commit.yml build → environment: npm - publish-release.yml publish → environment: npm - stable-release.yml create-release-pr → environment: npm - showcase_deploy.yml verify → environment: railway
1 parent 8537234 commit bed747b

5 files changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/prerelease.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ jobs:
8686
needs: build
8787
runs-on: ubuntu-latest
8888
timeout-minutes: 20
89+
environment: npm
8990
permissions:
9091
contents: read
9192
steps:

.github/workflows/publish-commit.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
build:
2424
runs-on: ubuntu-latest
2525
timeout-minutes: 15
26+
environment: npm
2627
permissions:
2728
contents: read
2829
# pkg-pr-new posts snapshot comments on the PR using the workflow token

.github/workflows/publish-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ jobs:
8080
needs: build
8181
runs-on: ubuntu-latest
8282
timeout-minutes: 20
83+
environment: npm
8384
permissions:
8485
contents: write
8586
steps:

.github/workflows/showcase_deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ jobs:
160160
if: needs.resolve-matrix.outputs.has_services == 'true'
161161
runs-on: ubuntu-latest
162162
timeout-minutes: 15
163+
environment: railway
163164
permissions:
164165
contents: read
165166
actions: read

.github/workflows/stable-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
if: github.ref == 'refs/heads/main'
4141
runs-on: ubuntu-latest
4242
timeout-minutes: 15
43+
environment: npm
4344
steps:
4445
- name: Check for existing release PR
4546
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7

0 commit comments

Comments
 (0)