-
Notifications
You must be signed in to change notification settings - Fork 5
39 lines (37 loc) · 899 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: Build
on:
push:
paths:
- 'generators/**'
- 'package.json'
workflow_dispatch:
jobs:
test:
name: Test on ${{ matrix.os }} (Node v${{ matrix.node }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [14, 15, 16, 17]
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: install
run: yarn install
- name: test
run: yarn test
publish:
name: Publish to NPM
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 10
registry-url: https://registry.npmjs.org/
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}