Skip to content

Commit 5c2caf5

Browse files
committed
github
1 parent 19b0e8f commit 5c2caf5

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+
name: Publish package to npmjs
5+
6+
on:
7+
push:
8+
tags:
9+
- "v*"
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: actions/setup-node@v3
17+
with:
18+
node-version: 22
19+
- run: npm install
20+
- run: npm test
21+
- run: npm run build
22+
23+
publish-gpr:
24+
needs: build
25+
runs-on: ubuntu-latest
26+
permissions:
27+
contents: read
28+
packages: write
29+
steps:
30+
- uses: actions/checkout@v3
31+
- uses: actions/setup-node@v3
32+
with:
33+
node-version: 16
34+
registry-url: https://registry.npmjs.org
35+
- run: npm publish --access public
36+
env:
37+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)