-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.28 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
52
53
54
55
name: Release
on:
push:
branches:
- main
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- run: npm ci
- run: npm run typecheck
- run: npm run lint
- run: npm run format
release:
needs: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
- run: |
git config user.name "$(git log -n 1 --pretty=format:%an)"
git config user.email "$(git log -n 1 --pretty=format:%ae)"
- run: npm run version -- --yes --conventional-graduate
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
publish-npm:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
registry-url: https://registry.npmjs.org/
scope: '@liip'
- run: git fetch --tags origin
- run: npm ci
- run: npm run publish -- --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}