dootask/.claude/commands/release.md
kuaifan bc75680ee9 feat: 添加 /release 发布流程 skill
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 09:51:20 +00:00

54 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 发布流程
刚性流程——严格按顺序执行,每步确认,任何一步失败则停止。
## 前置检查
在执行任何发布步骤之前,必须依次检查:
1. **分支检查**:当前分支必须是 `pro`,否则停止并提示用户切换
2. **工作区检查**`git status` 必须干净(无未提交变更),否则停止并提示用户先处理
3. **Node.js 版本**:必须 >= 20否则停止并提示
所有检查通过后,向用户报告检查结果,确认后再开始执行。
## 发布步骤
逐步执行以下命令,**每步执行前**向用户确认,**每步执行后**报告结果:
### Step 1: 翻译
```shell
npm run translate
```
更新多语言翻译文件。
### Step 2: 版本号
```shell
npm run version
```
更新版本号。
### Step 3: 构建前端
```shell
npm run build
```
构建前端生产版本。
### 最终确认:提交并推送
所有步骤完成后,通过 `git diff``git status` 获取所有变更,向用户汇报摘要。
汇报完毕后询问用户是否提交并推送。用户确认后才执行 git add、commit 和 push否则不执行。
## 失败处理
- 任何步骤失败后立即停止,报告错误信息
- 不要自动重试或跳过失败步骤
- 由用户决定如何处理