Skip to content

Commit 22f1acb

Browse files
CopilotYukaii
andcommitted
Add npm publish GitHub workflow for tag pushes
Co-authored-by: Yukaii <4230968+Yukaii@users.noreply.github.com>
1 parent 66e89c4 commit 22f1acb

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/publish.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish to NPM
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Use Node.js 22
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 22
19+
registry-url: 'https://registry.npmjs.org'
20+
21+
- name: Install dependencies
22+
run: npm install
23+
24+
- name: Run linter
25+
run: npm run lint
26+
27+
- name: Build project
28+
run: npm run build
29+
30+
- name: Run tests
31+
run: npm test
32+
33+
- name: Run browser tests
34+
run: npm run test:browser
35+
36+
- name: Publish to NPM
37+
run: npm publish
38+
env:
39+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)