-
Notifications
You must be signed in to change notification settings - Fork 71
39 lines (35 loc) · 1013 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
39
name: Build, Test and Publish
on:
workflow_dispatch:
push:
branches:
- 'master'
- 'alpha'
- 'main'
- 'next'
jobs:
build-test-publish:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: "Setup node with cache"
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn run format
- run: yarn run build
- name: "Setup git coordinates"
run: |
git config user.name ${{secrets.GH_USER}}
git config user.email ${{secrets.GH_EMAIL}}
- name: "Run semantic-release"
env:
GH_TOKEN: ${{secrets.GH_TOKEN}}
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/alpha'
run: yarn run release