-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (52 loc) · 1.46 KB
/
ci.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
62
63
64
65
66
67
68
69
70
name: CI
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
- uses: actions/setup-node@main
with:
node-version: 16
check-latest: true
- name: Install dependencies
run: npm ci
- name: Prettier
run: npm run prettier
- name: ESLint
run: npm run lint
- name: commitlint
run: npm run commitlint:all
- name: Publish
run: npm publish --dry-run
release:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: actions/setup-node@main
with:
node-version: 16
check-latest: true
- name: Install dependencies
run: npm ci
- name: Decrypt PGP key
run: ./.github/scripts/decrypt.sh
env:
PRIVATE_KEY_PASSPHRASE: ${{ secrets.PRIVATE_KEY_PASSPHRASE }}
- name: Setup git
run: ./.github/scripts/git.sh
env:
PGP_KEY_ID: ${{ secrets.PGP_KEY_ID }}
- name: Release
run: npm run release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }}
GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Cleanup
run: ./.github/scripts/cleanup.sh