Skip to content

Commit 96fb7a2

Browse files
authored
ci(repo): gate npm publish and deprecate workflows behind environments (#2385)
1 parent f4c149c commit 96fb7a2

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/deprecate-version.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ env:
1818
jobs:
1919
deprecate:
2020
runs-on: ubuntu-latest
21+
environment: npm-deprecate
2122
permissions:
2223
contents: read
2324

.github/workflows/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ jobs:
88
docs:
99
name: Generate and Publish Documentation
1010
runs-on: ubuntu-latest
11+
environment: docs-publish
12+
permissions:
13+
contents: write
1114

1215
steps:
1316
- name: Checkout repository

.github/workflows/publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
release-stable: # stable releases can only be manually triggered
3737
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.version_specifier != '' }}
3838
runs-on: ubuntu-latest
39+
environment: npm-publish
3940
outputs:
4041
released_version: ${{ steps.extract-version.outputs.version }}
4142
permissions:
@@ -208,6 +209,7 @@ jobs:
208209
release-beta:
209210
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.beta_version != '' }}
210211
runs-on: ubuntu-latest
212+
environment: npm-publish
211213
permissions:
212214
contents: read
213215
id-token: write
@@ -319,6 +321,7 @@ jobs:
319321
# v3 next prerelease — manual dispatch only, must be run from the v3 branch.
320322
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.next_prerelease == 'true' && github.ref == 'refs/heads/v3' }}
321323
runs-on: ubuntu-latest
324+
environment: npm-publish
322325
permissions:
323326
contents: read
324327
id-token: write
@@ -446,6 +449,7 @@ jobs:
446449
release-canary:
447450
name: Release Prerelease
448451
runs-on: ubuntu-latest
452+
environment: npm-publish
449453
needs: [ci-core, ci-supabase-js]
450454
permissions:
451455
contents: read

0 commit comments

Comments
 (0)