-
Notifications
You must be signed in to change notification settings - Fork 5
50 lines (48 loc) · 1.23 KB
/
build-release.yaml
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
name: Build & Release
on:
push:
tags:
- v*
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
name: Use Node.js ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Lint Check
run: npm run lint
- name: Test
run: npm run test
publish-npm:
runs-on: ubuntu-latest
needs: validate
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: 12.x
registry-url: https://registry.npmjs.org/
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
publish-gpr:
runs-on: ubuntu-latest
needs: validate
steps:
- uses: actions/checkout@master
# Setup node for Github Package Registry
- uses: actions/setup-node@master
with:
node-version: 12.x
registry-url: https://npm.pkg.github.com/telus
# Publish to Github Package Registry
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_SECRET }}