File tree Expand file tree Collapse file tree 3 files changed +110
-1
lines changed
Expand file tree Collapse file tree 3 files changed +110
-1
lines changed Original file line number Diff line number Diff line change 11# GitHub Workflows 使用指南
22
3+ ## 发布命令说明
4+
5+ ### bumpp
6+
7+ ` bumpp ` 是一个交互式的版本号升级工具,它会:
8+
9+ 1 . ** 显示当前版本** - 显示 package.json 中的当前版本
10+ 2 . ** 提示选择新版本** - 提供选项让你选择:
11+ - ` patch ` (0.0.x) - 修复 bug
12+ - ` minor ` (0.x.0) - 新功能
13+ - ` major ` (x.0.0) - 破坏性变更
14+ - 自定义版本号
15+ 3 . ** 自动更新文件** - 更新 package.json、CHANGELOG.md 等文件
16+ 4 . ** 创建 git commit 和 tag** - 自动提交版本变更并创建 git tag
17+
18+ ``` shell
19+ # 运行 bumpp 时的交互示例
20+ ? Current version: 6.0.0-beta.0
21+ ? Select release type:
22+ patch (6.0.0-beta.1)
23+ minor (6.0.1-beta.0)
24+ major (6.1.0-beta.0)
25+ premajor (7.0.0-beta.0)
26+ ❯ custom
27+ ```
28+
29+ ### pnpm publish
30+
31+ 将包发布到 npm registry:
32+
33+ 1 . ** 运行 prepublishOnly** - 执行 ` pnpm build ` 构建项目
34+ 2 . ** 上传到 npm** - 将 ` dist ` 目录发布到 npm
35+
36+ ### && 连接符
37+
38+ 两个命令串联执行:
39+ - ` bumpp ` 成功后才执行 ` pnpm publish `
40+ - 如果 ` bumpp ` 失败或用户取消,` pnpm publish ` 不会执行
41+
42+ ### 完整发布流程
43+
44+ ``` shell
45+ pnpm run release
46+ ```
47+
48+ 等同于:
49+
50+ ``` shell
51+ # 1. bumpp 交互式选择版本
52+ bumpp
53+ → 更新 package.json 版本号
54+ → 更新 CHANGELOG.md
55+ → 创建 git commit
56+ → 创建 git tag (如 v6.0.0)
57+
58+ # 2. 发布到 npm
59+ pnpm publish
60+ → 运行 prepublishOnly (pnpm build)
61+ → 上传到 npm registry
62+ ```
63+
64+ ### 发布后还需要
65+
66+ ``` shell
67+ git push --follow-tags
68+ ```
69+
70+ 将 commit 和 tag 推送到远程仓库。
71+
372## 工作流触发条件
473
574| 工作流 | 触发条件 | 用途 |
Original file line number Diff line number Diff line change 103103 "@angular-eslint/eslint-plugin" : " ^19.0.0" ,
104104 "@angular-eslint/eslint-plugin-template" : " ^19.0.0" ,
105105 "@angular-eslint/template-parser" : " ^19.0.0" ,
106- "@e18e/eslint-plugin" : " ^0.4 .0" ,
106+ "@e18e/eslint-plugin" : " ^0.2 .0" ,
107107 "@eslint/markdown" : " ^6.3.0" ,
108108 "@next/eslint-plugin-next" : " >=15.0.0" ,
109109 "@unocss/eslint-plugin" : " >=0.60.0" ,
You can’t perform that action at this time.
0 commit comments