-
-
Notifications
You must be signed in to change notification settings - Fork 25
39 lines (37 loc) · 873 Bytes
/
main.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: Deploy
on:
push:
tags:
- 'v*'
jobs:
build-test-publish:
name: Lint, Test, Build, and Publish to NPM
runs-on: ubuntu-latest
strategy:
matrix:
node: [10]
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
registry-url: https://registry.npmjs.org/
- name: Install yarn
run: npm install yarn@latest -g
- name: Install dependencies
run: yarn
- name: Run lint, test, build
run: |
yarn lint
yarn test
yarn build
- name: Ensure package-lock.json
run: |
rm -rf node_modules
npm install
- name: Publish
run: |
npm ci
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}