Skip to content
This repository was archived by the owner on Oct 26, 2021. It is now read-only.

Commit b20889f

Browse files
author
Ludwig Richter
authored
Added CI configuration
1 parent a694993 commit b20889f

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/npmpublish.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Node.js Package
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]*.[0-9]*.[0-9]*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v1
13+
- uses: actions/setup-node@v1
14+
with:
15+
node-version: 12
16+
- run: npm ci
17+
- run: npm run build
18+
- run: npm test
19+
- run: npm run lint
20+
21+
publish-npm:
22+
needs: build
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v1
26+
- uses: actions/setup-node@v1
27+
with:
28+
node-version: 12
29+
registry-url: https://registry.npmjs.org/
30+
- run: npm publish
31+
env:
32+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
33+
34+
# publish-gpr:
35+
# needs: build
36+
# runs-on: ubuntu-latest
37+
# steps:
38+
# - uses: actions/checkout@v1
39+
# - uses: actions/setup-node@v1
40+
# with:
41+
# node-version: 12
42+
# registry-url: https://npm.pkg.github.com/
43+
# scope: '@server-state'
44+
# - run: npm publish
45+
# env:
46+
# NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)