release
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRelease Skill
Release Skill
此 Skill 旨在提供一个标准化的发布流程。它通过脚本自动处理繁琐的操作,并利用 AI 总结用户可感知的改动。
This Skill is designed to provide a standardized release process. It automatically handles tedious operations through scripts and uses AI to summarize user-perceivable changes.
目录结构
Directory Structure
- : 自动更新
scripts/bump_version.py版本号。pubspec.yaml - : 提取自上次发布以来的 Git 提交记录。
scripts/get_commits.py - : 格式化发布日志模板。
scripts/format_release.py
- : Automatically updates the version number in
scripts/bump_version.py.pubspec.yaml - : Extracts Git commit records since the last release.
scripts/get_commits.py - : Formats the release log template.
scripts/format_release.py
使用流程
Usage Process
-
准备阶段
- 检查当前分支是否为发布分支(通常是 master/main)。
- 确认工作区是干净的(没有未提交的改动)。
-
版本号更新
- 运行 。
python3 scripts/bump_version.py - 如果用户提供了版本号,则使用用户指定的;否则,脚本会自动在当前版本号的基础上增加一个小版本号(patch)。
- 运行
-
生成发布日志
- 运行 获取原始提交记录。
python3 scripts/get_commits.py - 将记录提供给 AI,根据 的定义,总结出用户可感知的改动。
scripts/format_release.py - 改动分类应包括:✨新增功能、🐛修复问题、🔧性能优化、📋其它。架构优化和技术细节无需列入用户日志。
- 运行
-
提交与标注
- 提交改动:。
release: {版本号}\n\n{发布日志内容} - 打标签:。
v{版本号}
- 提交改动:
-
推送
- 将代码和标签推送到远程仓库:。
git push origin {branch} --tags
- 将代码和标签推送到远程仓库:
-
Preparation Phase
- Check if the current branch is the release branch (usually master/main).
- Ensure the workspace is clean (no uncommitted changes).
-
Version Number Update
- Run .
python3 scripts/bump_version.py - If a version number is provided by the user, use the specified one; otherwise, the script will automatically increment the patch version number based on the current version.
- Run
-
Generate Release Log
- Run to get raw commit records.
python3 scripts/get_commits.py - Provide the records to AI, and summarize user-perceivable changes according to the definition in .
scripts/format_release.py - The change categories should include: ✨New Features, 🐛Bug Fixes, 🔧Performance Optimizations, 📋Others. Architecture optimizations and technical details do not need to be included in the user-facing log.
- Run
-
Commit and Tag
- Commit the changes: .
release: {version number}\n\n{release log content} - Create a tag: .
v{version number}
- Commit the changes:
-
Push
- Push the code and tags to the remote repository: .
git push origin {branch} --tags
- Push the code and tags to the remote repository:
注意事项
Notes
- 提交消息必须使用真实的换行,而不是 字符串。
\n - 确认发布日志内容后,再进行 Commit 操作。
- Commit messages must use actual line breaks instead of strings.
\n - Confirm the release log content before performing the Commit operation.