Skip to content

Commit d9d4a05

Browse files
committed
Create npm-publish.yml
1 parent 33a9616 commit d9d4a05

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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 to NPM
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
publish-npm:
12+
name: Publish to NPM
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v6
16+
- uses: actions/setup-node@v6
17+
with:
18+
node-version: 26
19+
registry-url: https://registry.npmjs.org/
20+
- name: npm install, build, and test
21+
run: |
22+
npm ci
23+
npm test
24+
env:
25+
CI: true
26+
- run: npm publish --access public
27+
env:
28+
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

0 commit comments

Comments
 (0)