Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use environments to track deployments #3497

Merged
merged 1 commit into from
Feb 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
runs-on: ubuntu-latest
name: Publish Canary
if: github.event.workflow_run.event == 'pull_request'
environment: canary-pr-npm
steps:
- name: Checkout repo
uses: actions/checkout@v2
Expand Down Expand Up @@ -75,7 +76,7 @@ jobs:
- name: Publish NPM package
run: npm publish --ignore-scripts ./npmDist
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_CANARY_PR_PUBLISH_TOKEN }}

- name: Add comment on PR
uses: actions/github-script@v5
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ jobs:
name: Deploy to `npm` branch
needs: ci
if: github.ref == 'refs/heads/main'
environment:
name: npm-branch
url: https://github.com/graphql/graphql-js/tree/npm
uses: ./.github/workflows/deploy-artifact-as-branch.yml
with:
artifact_name: npmDist
Expand All @@ -17,6 +20,9 @@ jobs:
name: Deploy to `deno` branch
needs: ci
if: github.ref == 'refs/heads/main'
environment:
name: deno-branch
url: https://github.com/graphql/graphql-js/tree/deno
uses: ./.github/workflows/deploy-artifact-as-branch.yml
with:
artifact_name: denoDist
Expand Down