-
Notifications
You must be signed in to change notification settings - Fork 27
43 lines (39 loc) · 937 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
40
41
42
43
name: Node.js Package
on:
push:
branches:
- master
pull_request:
branches:
- master
release:
types: [published]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- python: python2
pip: pip
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install python dependencies
run: |
${{ matrix.pip }} install --user --upgrade pip
- name: Install node
uses: actions/setup-node@v2
with:
node-version: '10.14.0'
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: yarn build
- if: ${{ github.event_name == 'release' }}
run: yarn copy
- if: ${{ github.event_name == 'release' }}
run: >
cd dist;
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}