-
Notifications
You must be signed in to change notification settings - Fork 7
39 lines (36 loc) · 926 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
36
37
38
39
name: Build
on:
push:
branches:
- master
tags:
- 'v*'
pull_request:
branches:
- master
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7
- name: Setup Node
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # 4.0.3
with:
node-version-file: .nvmrc
cache: 'yarn'
- name: Install dependencies
run: yarn install
- name: Lint
run: yarn lint
- name: Build
run: yarn build
- name: Test
run: yarn test
- name: Publish
if: startsWith(github.ref, 'refs/tags/v')
run: |
echo '//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}'>.npmrc
npm publish