Skip to content

Commit f15f0d3

Browse files
committed
ci: add npm publish workflow
1 parent 911b276 commit f15f0d3

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This workflow will run tests using node and then publish a package to npm when a release is created
2+
3+
name: Node.js Package
4+
5+
on:
6+
release:
7+
types: [ created ]
8+
9+
jobs:
10+
release:
11+
name: Release
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 24
22+
registry-url: https://registry.npmjs.org/
23+
24+
- name: Dependencies
25+
run: npm install
26+
27+
- name: Lint
28+
run: npm run lint
29+
30+
- name: Test
31+
run: npm test
32+
env:
33+
CI: true
34+
35+
- name: Build
36+
run: npm run build
37+
38+
- name: Publish
39+
run: npm publish
40+
env:
41+
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}

0 commit comments

Comments
 (0)