-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (59 loc) · 1.72 KB
/
check.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: Checks
on: [push]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- run: yarn install --frozen-lockfil
- run: yarn typecheck
- run: yarn lint
- run: yarn test
publish:
name: Release
runs-on: ubuntu-latest
needs: [test]
if: ${{ github.ref == 'refs/heads/master' }}
steps:
# Checkout
- uses: actions/checkout@v2
with:
ref: 'master'
fetch-depth: 0
# Configure GPG
- run: |
mkdir -p ~/.gnupg/
printf "$GPG_SIGNING_KEY" | base64 --decode > ~/.gnupg/private.key
gpg --import ~/.gnupg/private.key
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
# Configure Git
- run: |
git config --local user.email $GIT_EMAIL
git config --local user.name $GIT_USER
git config --local user.signingkey $GPG_KEY_ID
git config --local commit.gpgsign true
env:
GIT_USER: ${{ secrets.GIT_USER }}
GIT_EMAIL: ${{ secrets.GIT_EMAIL }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID}}
# NPM Registry
- uses: actions/setup-node@v2
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
scope: ${{ secrets.SCOPE }}
# Install
- run: yarn install --frozen-lockfile
- run: yarn lerna version --yes
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
# Publish to NPM
- run: yarn lerna publish from-package --no-verify-access --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}