-
Notifications
You must be signed in to change notification settings - Fork 699
51 lines (48 loc) · 1.32 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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:
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/pmndrs/playwright:drei
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
cache: 'yarn'
- run: yarn install
- run: yarn build
- run: yarn test
build-and-release:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
cache: 'yarn'
- run: yarn install
- run: yarn build
- run: yarn build-storybook
# 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 }}