-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (31 loc) · 886 Bytes
/
ci.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
name: build
on:
workflow_dispatch:
push:
branches: [ main ]
tags: [ v* ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install
run: npm ci
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: https://registry.npmjs.org/
scope: netatwork
- name: build
run: npm run build
- name: test
run: npm test
# Note that this does not takes care of the versioning.
# Changelog generation, version tagging needs to be done, prior to this.
- name: publish to npm
run: npm publish --access public --@netatwork:registry=https://registry.npmjs.org/
if: startsWith(github.ref, 'refs/tags/v')
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}