Skip to content

Commit 95dac43

Browse files
ci: use environments to track deployments (#3497)
1 parent c5345df commit 95dac43

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/canary.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
name: Publish Canary
1212
if: github.event.workflow_run.event == 'pull_request'
13+
environment: canary-pr-npm
1314
steps:
1415
- name: Checkout repo
1516
uses: actions/checkout@v2
@@ -75,7 +76,7 @@ jobs:
7576
- name: Publish NPM package
7677
run: npm publish --ignore-scripts ./npmDist
7778
env:
78-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
79+
NODE_AUTH_TOKEN: ${{ secrets.NPM_CANARY_PR_PUBLISH_TOKEN }}
7980

8081
- name: Add comment on PR
8182
uses: actions/github-script@v5

.github/workflows/push.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ jobs:
77
name: Deploy to `npm` branch
88
needs: ci
99
if: github.ref == 'refs/heads/main'
10+
environment:
11+
name: npm-branch
12+
url: https://github.com/graphql/graphql-js/tree/npm
1013
uses: ./.github/workflows/deploy-artifact-as-branch.yml
1114
with:
1215
artifact_name: npmDist
@@ -17,6 +20,9 @@ jobs:
1720
name: Deploy to `deno` branch
1821
needs: ci
1922
if: github.ref == 'refs/heads/main'
23+
environment:
24+
name: deno-branch
25+
url: https://github.com/graphql/graphql-js/tree/deno
2026
uses: ./.github/workflows/deploy-artifact-as-branch.yml
2127
with:
2228
artifact_name: denoDist

0 commit comments

Comments
 (0)