Skip to content
This repository was archived by the owner on Nov 16, 2025. It is now read-only.

Commit 5b2bc54

Browse files
authored
Add npm registry to release workflow
1 parent 597123d commit 5b2bc54

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/workflows/release-package.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
11
name: Node.js Package
2-
32
on:
43
release:
54
types: [created]
65
jobs:
7-
build_publish:
6+
build:
87
runs-on: ubuntu-latest
98
steps:
109
- uses: actions/checkout@v2
10+
# Setup .npmrc file to publish to npm
11+
- uses: actions/setup-node@v2
12+
with:
13+
node-version: '10.x'
14+
registry-url: 'https://registry.npmjs.org'
15+
- run: npm install
16+
# Publish to npm
17+
- run: npm publish --access public
18+
env:
19+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1120
# Setup .npmrc file to publish to GitHub Packages
12-
- uses: actions/setup-node@v1
21+
- uses: actions/setup-node@v2
1322
with:
14-
node-version: '12.x'
1523
registry-url: 'https://npm.pkg.github.com'
16-
- run: npm ci
24+
# Publish to GitHub Packages
1725
- run: npm publish
1826
env:
1927
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20-

0 commit comments

Comments
 (0)