Skip to content

chore: Merge master into prerelease/minor [skip release] #514

chore: Merge master into prerelease/minor [skip release]

chore: Merge master into prerelease/minor [skip release] #514

Workflow file for this run

name: Canary
on:
push:
branches:
- prerelease/*
workflow_dispatch: # Allow manual triggering of this job in case of failures
jobs:
canary:
runs-on: ubuntu-latest
steps:
## First, we'll checkout the repository. We don't persist credentials because we need a
## Personal Access Token to push on a branch that is protected. See
## https://github.com/cycjimmy/semantic-release-action#basic-usage
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0 # Used for conventional commit ranges
- uses: Workday/canvas-kit-actions/install@v1
with:
node_version: 16.x
## Build Storybook and extract component stories for Storybook aggregation. This will be used
## for Chromatic rebaselining and publishing to GH Pages. Should be before `yarn build` since
## built assets mess up this command
- name: Build Storybook
run: |
yarn build-storybook --quiet
npx sb extract docs docs/stories.json
## Build for packaging.
- name: Build
run: yarn build
## Publish prerelease to npm. Must be run after a build
- name: Publish
run: node utils/publish-canary.mjs
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_CI_PUBLISH_TOKEN}}
SLACK_WEBHOOK: ${{secrets.SLACK_WEBHOOK}}
BUILD_URL:
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
## Create a Chromatic baseline auto-accepting changes. Chromatic changes are already accepted
## in PRs, so we don't need to manually approve them here again. This new baseline will be
## used for future PRs. New PRs may show extra Chromatic changes until the "Update Branch"
## button is used in PRs which will pull this new baseline.
- name: Update Chromatic Baseline
uses: chromaui/action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_APP_CODE }}
storybookBuildDir: docs
exitOnceUploaded: true
exitZeroOnChanges: true
autoAcceptChanges: true