Skip to content
This repository was archived by the owner on May 21, 2026. It is now read-only.

Commit cb71551

Browse files
authored
Create npm-publish.yml
1 parent a933bbe commit cb71551

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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: Publish NPM and GPR
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
12+
publish-npm:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions/setup-node@v1
17+
with:
18+
node-version: 12
19+
registry-url: https://registry.npmjs.org/
20+
- run: npm ci
21+
- run: npm run package
22+
- run: npm publish
23+
env:
24+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
25+
26+
publish-gpr:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v2
30+
- uses: actions/setup-node@v1
31+
with:
32+
node-version: 12
33+
registry-url: https://npm.pkg.github.com/
34+
- run: npm ci
35+
- run: npm run package
36+
- run: npm publish
37+
env:
38+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)