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: add stub action for canary releases on PRs #3468

Merged
merged 1 commit into from Feb 2, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/canary.yaml
@@ -0,0 +1,19 @@
name: Canary Release
on:
workflow_run:
workflows:
- CI
types:
- completed
env:
NODE_VERSION_USED_FOR_DEVELOPMENT: 17
jobs:
publish-canary:
runs-on: ubuntu-latest
name: Publish Canary
if: ${{ github.event.workflow_run.event == 'pull_request' }}
steps:
- name: Dump GitHub context
run: echo "$GITHUB_CONTEXT"
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -236,6 +236,34 @@ jobs:
path: ./npm-dist-diff.html
if-no-files-found: ignore

build-npm-package:
name: Build artifact with NPM package
runs-on: ubuntu-latest
needs: [test, fuzz, lint, integrationTests]
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v2
with:
cache: npm
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}

- name: Install Dependencies
run: npm ci --ignore-scripts

- name: Build NPM package
run: npm run build:npm

- name: Upload NPM package
uses: actions/upload-artifact@v2
with:
name: npmDist
path: ./npmDist

deploy-to-npm-branch:
name: Deploy to `npm` branch
runs-on: ubuntu-latest
Expand Down