-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (58 loc) · 1.51 KB
/
build.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
56
57
58
59
60
61
name: Build
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@main
- run: |
npm ci --no-audit
npm run lint
npm run test:ci
test-coverage:
needs: test
name: test-coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: actions/setup-node@master
with:
node-version: 20
- uses: actions/cache@main
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: npm run coverage
debug: true
publish-to-npm:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: actions/setup-node@main
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- uses: actions/cache@main
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- run: |
npm ci
npm run build
- name: Semantic Release
uses: cycjimmy/semantic-release-action@main
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}