Skip to content

Commit 933e94f

Browse files
committed
chore: 设置版本为 0.1.0,添加 npm 自动发布 workflow
1 parent 588d1b9 commit 933e94f

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

.github/workflows/publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: 20
17+
registry-url: 'https://registry.npmjs.org'
18+
cache: npm
19+
20+
- run: npm ci
21+
22+
- run: npm run build:lib
23+
24+
- run: npm publish --access public
25+
env:
26+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ taskbar_screenshot*
1212
tmp/
1313
*.png
1414
*.yml
15+
!.github/**/*.yml

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@caoergou/windows-xp",
3-
"version": "1.0.0",
3+
"version": "0.1.0",
44
"description": "A faithful recreation of Windows XP desktop in React - Relive the millennium era with authentic Y2K aesthetics",
55
"main": "dist/windows-xp.umd.js",
66
"module": "dist/windows-xp.es.js",

0 commit comments

Comments
 (0)