Skip to content

Commit 2fe552f

Browse files
author
王允
committed
支持 github actions上集成 npm publish上传代码后就自动推送到 npm, 修复其他问题
1 parent 5879844 commit 2fe552f

10 files changed

Lines changed: 328 additions & 912 deletions

File tree

.github/workflows/publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish to npm
2+
3+
on:
4+
release:
5+
types: [created]
6+
push:
7+
branches: [master]
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '22.x'
21+
registry-url: 'https://registry.npmjs.org'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Build
27+
run: npm run build
28+
29+
- name: Publish to npm
30+
run: npm publish --access public
31+
env:
32+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

CLAUDE.md

Lines changed: 0 additions & 169 deletions
This file was deleted.

0 commit comments

Comments
 (0)