-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (54 loc) · 1.51 KB
/
ci.yml
File metadata and controls
63 lines (54 loc) · 1.51 KB
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
62
63
name: CI
on:
push:
jobs:
test:
name: 'Test with Node version: ${{ matrix.node }}'
runs-on: ubuntu-latest
strategy:
matrix:
node: [node, lts/*]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Install Dependencies
run: npm ci
- name: Run Lint
run: npm run lint
- name: Run Build
run: npm run build
- name: Run Jest
run: npx jest
publish:
needs: [test]
name: Publish NPM Package
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.PIPELINE_BOT_PAT }}
fetch-depth: 0
persist-credentials: true
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Install Dependencies
run: npm ci
- name: Semantic Release
env:
GIT_AUTHOR_NAME: 'im-pipeline-bot'
GIT_AUTHOR_EMAIL: '73202619+im-pipeline-bot@users.noreply.github.com'
GIT_COMMITTER_NAME: 'im-pipeline-bot'
GIT_COMMITTER_EMAIL: '73202619+im-pipeline-bot@users.noreply.github.com'
GITHUB_TOKEN: ${{ secrets.PIPELINE_BOT_PAT }}
GH_TOKEN: ${{ secrets.PIPELINE_BOT_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release