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
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
ci: use environments to track deployments
IvanGoncharov committed Feb 12, 2022
commit 4a0bc98371a633cf49efc236c1011ca5a955e848
3 changes: 2 additions & 1 deletion .github/workflows/canary.yaml
Original file line number Diff line number Diff line change
@@ -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
@@ -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
6 changes: 6 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -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
@@ -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