-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (31 loc) · 923 Bytes
/
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
name: Lint, Build, Test, Publish
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install packages, build, test
run: |
npm ci
npm i [email protected] -g
lerna bootstrap
npm run auto:lint
npm run build
npm run test
- uses: actions-ecosystem/action-regex-match@v2
id: regex-match
with:
text: ${{ github.ref }}
regex: '^v[0-9]+$'
- name: Publish package to NPM
if: ${{ steps.regex-match.outputs.match != '' }} && github.event_name == 'push'
run: |
echo "registry=https://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" >> .npmrc
npm run auto:lerna:publish