Skip to content

Commit 7900c56

Browse files
authored
Publish to npmjs not github packages
1 parent 08d2db3 commit 7900c56

File tree

1 file changed

+5
-23
lines changed

1 file changed

+5
-23
lines changed
Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,18 @@
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-
1+
name: Publish Package to npmjs
62
on:
73
release:
84
types: [created]
9-
105
jobs:
116
build:
127
runs-on: ubuntu-latest
138
steps:
149
- uses: actions/checkout@v2
10+
# Setup .npmrc file to publish to npm
1511
- uses: actions/setup-node@v2
1612
with:
17-
node-version: 16
18-
- run: npm ci
19-
- run: npm test
20-
21-
publish-gpr:
22-
needs: build
23-
runs-on: ubuntu-latest
24-
permissions:
25-
contents: read
26-
packages: write
27-
steps:
28-
- uses: actions/checkout@v2
29-
- uses: actions/setup-node@v2
30-
with:
31-
node-version: 16
32-
registry-url: https://npm.pkg.github.com/
13+
node-version: '16.x'
14+
registry-url: 'https://registry.npmjs.org'
3315
- run: npm ci
3416
- run: npm publish
3517
env:
36-
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
18+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)