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

Commit ca115e9

Browse files
authored
chore: DEVP-578 add a github action to publish to npm and gpr (#6)
1 parent a4e14d4 commit ca115e9

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/package.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Node.js Package
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
11+
- uses: actions/setup-node@v2
12+
with:
13+
registry-url: "https://registry.npmjs.org"
14+
cache: "npm"
15+
16+
- name: Install dependencies
17+
run: npm install
18+
19+
- name: Publish package to npm
20+
run: npm publish --access public
21+
env:
22+
NODE_AUTH_TOKEN: ${{ secrets.ENVOY_NPM_AUTOMATION_TOKEN }}
23+
24+
# Setup .npmrc file to publish to npm
25+
- uses: actions/setup-node@v2
26+
with:
27+
registry-url: "https://npm.pkg.github.com"
28+
cache: "npm"
29+
30+
- name: Publish package to GitHub Package Registry
31+
run: npm publish
32+
env:
33+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)