-
Notifications
You must be signed in to change notification settings - Fork 707
36 lines (34 loc) · 1.07 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: release
on:
push:
branches:
- 'master'
- 'beta'
- 'alpha'
- 'canary-*'
pull_request: {}
# Cancel any previous run (see: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency)
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # https://www.chromatic.com/docs/github-actions#support-for-codeactionscheckoutv2code-and-above
- uses: actions/setup-node@v3
with:
cache: 'yarn'
- run: yarn install
- run: yarn build-storybook
- run: yarn chromatic -- --exit-once-uploaded
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
- run: yarn test
# semantic-release skips not configured branches(see: release.config.js) or pull-requests
- run: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}