-
Notifications
You must be signed in to change notification settings - Fork 17
38 lines (36 loc) · 981 Bytes
/
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
name: 🚀 Release The Package
on:
workflow_run:
workflows:
- "🧪 Run Tests"
branches: [main]
types:
- completed
jobs:
on-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
strategy:
matrix:
node-version:
- 16.x
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- run: yarn install --frozen-lockfile
- run: yarn lint
- run: yarn build
- name: 🚀 Release
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: yarn semantic-release
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo '❌ Release has canceled due to tests fail.'