Files
clawpanel/.windsurf/workflows/release.md
晴天 e62f270422 chore: 跨平台构建脚本 + CI/CD 改进 + 行尾规范
- 新增 .gitattributes 统一 LF 行尾,解决 Mac/Windows 协作 CRLF 问题
- 新增 build.ps1 Windows 本地构建脚本(支持 -Debug/-Clean 参数)
- 新增 build.sh macOS/Linux 本地构建脚本
- 新增 .windsurf/workflows/release.md 发版操作工作流
- release.yml: 将 Release Notes 更新抽为独立 job,彻底解决多 matrix job 竞争条件
- release.yml: 补充代码签名环境变量注释占位,开源后可直接配 Secrets 启用
- ci.yml: 增加 cargo fmt --check 和 cargo clippy -D warnings 质量门禁
- .gitignore: 补充 Windows 平台特有文件、内部报告、IDE 文件
- docs/index.html: 修正 openclaw 仓库 URL
- README.md: 修正 openclaw 仓库 URL
2026-03-04 12:17:48 +08:00

65 lines
1.6 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.
---
description: 发布新版本(打 tag + 推送,触发跨平台构建)
---
## 发布前检查
1. 确认所有改动已提交,工作区干净:
```bash
git status
```
2. 确认 CI 全部通过main 分支绿灯)
3. 更新 `CHANGELOG.md`,在顶部加入本次版本的变更记录
4. 更新 `src-tauri/tauri.conf.json` 中的 `version` 字段,与即将发布的版本号保持一致:
```json
{ "version": "1.2.3" }
```
5. 提交版本更新:
```bash
git add CHANGELOG.md src-tauri/tauri.conf.json
git commit -m "chore: release v1.2.3"
git push origin main
```
## 打 tag 并触发发布
```bash
git tag v1.2.3
git push origin v1.2.3
```
推送 tag 后GitHub Actions 会自动:
- 并行构建 macOS ARM64 / macOS Intel / Linux / Windows 四个平台
- 创建 GitHub Release 并上传安装包
- 所有平台构建完成后统一写入 Release Notes
## 查看构建进度
前往仓库 **Actions** 页面,找到 `Release` 工作流查看实时日志。
## 手动触发(不打 tag
在 GitHub Actions 页面手动触发 `Release` 工作流,输入版本号(如 `v1.2.3`)。
## 发布后验证
- [ ] Release 页面出现四个平台的安装包
- [ ] Release Notes 内容正确(有下载表格 + changelog
- [ ] 下载 Windows EXE 安装验证可用
- [ ] `latest` 标签指向新 Release
## 回滚
如果发布有问题,在 GitHub Releases 页面将该 Release 设为 Draft 或删除,然后修复后重新打 tag
```bash
git tag -d v1.2.3
git push origin :refs/tags/v1.2.3
# 修复问题后
git tag v1.2.3
git push origin v1.2.3
```