Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

ci: add canary release workflow #151

ci: add canary release workflow

ci: add canary release workflow #151

Workflow file for this run

name: checks
on:
push:
branches-ignore:
- main
# When Changesets opens a PR it does not trigger GitHub actions,
# because its token does not have permission to. This is a hack
# to allow one of us to trigger GitHub actions for a changesets PR
# by enabling automerge on the PR.
pull_request_target:
types:
- auto_merge_enabled
branches:
- main # the target branch of the PR
paths:
- "**/CHANGELOG.md" # only changesets releases touch changelogs
jobs:
build:
if: github.head_ref != 'changeset-release/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
cache: yarn
node-version-file: .nvmrc
registry-url: "https://npm.pkg.github.com/"
- run: yarn install --frozen-lockfile --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: yarn build
lint:
if: github.head_ref != 'changeset-release/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
cache: yarn
node-version-file: .nvmrc
registry-url: "https://npm.pkg.github.com/"
- run: yarn install --frozen-lockfile --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: yarn lint-ci
test:
if: github.head_ref != 'changeset-release/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
cache: yarn
node-version-file: .nvmrc
registry-url: "https://npm.pkg.github.com/"
- run: yarn install --frozen-lockfile --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: yarn test --ci