Skip to content

Commit 4b20ed8

Browse files
committed
Create npmpublish.yml
1 parent 0a74040 commit 4b20ed8

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/npmpublish.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3+
4+
name: Node.js Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: 12
18+
- run: npm i
19+
- run: npm ci
20+
- run: npm build
21+
22+
publish-npm:
23+
needs: build
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v2
27+
- uses: actions/setup-node@v1
28+
with:
29+
node-version: 12
30+
registry-url: https://registry.npmjs.org/
31+
- run: npm i
32+
- run: npm ci
33+
- run: npm build
34+
- run: npm publish
35+
env:
36+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
37+
38+
publish-gpr:
39+
needs: build
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v2
43+
- uses: actions/setup-node@v1
44+
with:
45+
node-version: 12
46+
registry-url: https://npm.pkg.github.com/
47+
scope: '@Jacxk'
48+
- run: npm i
49+
- run: npm ci
50+
- run: npm build
51+
- run: npm publish
52+
env:
53+
NODE_AUTH_TOKEN: ${{ secrets.TOKEN }}

0 commit comments

Comments
 (0)