with one click
release-version
发布 Daily Satori 新版本,生成更新日志并执行 git commit 和 git tag 命令
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
发布 Daily Satori 新版本,生成更新日志并执行 git commit 和 git tag 命令
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | release-version |
| description | 发布 Daily Satori 新版本,生成更新日志并执行 git commit 和 git tag 命令 |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"maintainers","workflow":"github"} |
为 Daily Satori 项目发布新版本,完整执行以下步骤:
app/build.gradle.kts 的 versionName 读取当前版本,递增 patch 版本,并跳过任何包含数字 4 的版本号app/build.gradle.kts 的 versionName 更新为计算后的新版本docs/versions/changelog_${version}.mdgit add . 和 git commitgit tag v${version}main 和版本 tag,触发 GitHub Actions 构建并发布 APK发布只需要提交代码、打 tag、同步 GitHub main 和 tag。不在本地编译 release 版本;APK 由 GitHub Actions 构建并上传到 Release。
当需要发布新版本时使用,例如:
current_version=$(grep "versionName" app/build.gradle.kts | sed -E 's/.*versionName = "([^"]+)".*/\1/' | tr -d ' ')
major=${current_version%%.*}
rest=${current_version#*.}
minor=${rest%%.*}
patch=${current_version##*.}
next_patch=$((patch + 1))
current_version="${major}.${minor}.${next_patch}"
while [[ "$current_version" == *4* ]]; do
next_patch=$((next_patch + 1))
current_version="${major}.${minor}.${next_patch}"
done
版本号硬性规则:发布版本号任意段都不能包含数字 4。如果常规递增结果包含 4,继续递增直到不包含 4。例如当前版本 5.0.3,发版时必须跳到 5.0.5。
perl -0pi -e "s/versionName = \"[^\"]+\"/versionName = \"${current_version}\"/" app/build.gradle.kts
previous_tag=$(git tag --sort=-v:refname | head -2 | tail -1)
根据提交记录整理,按以下格式分类:
- 新增 xx 功能
- 优化 xx 功能
- 修复 xx 问题
分类规则:
保存到 docs/versions/changelog_${version}.md
# 提交所有变更
git add .
git commit -m "Release v${current_version}"
# 打标签
git tag v${current_version}
推送 main 和版本 tag。远程 tag 会触发 .github/workflows/android-release.yml,由 GitHub Actions 构建签名 APK 并上传到 GitHub Release。
git push origin main "v${current_version}"
# 使用 gh 验证 GitHub release/tag 已存在;如 Actions 仍在运行,可稍后重试
gh release view "v${current_version}" --repo SatoriTours/Daily --json tagName,targetCommitish,url
如果远程 release/tag 已存在,先验证它:
gh release view "v${current_version}" --repo SatoriTours/Daily --json tagName,targetCommitish,url
只有在用户明确要求修正错误 tag 时,才删除并重建远程 tag。不要 force push main/master。
4app/build.gradle.kts 的 versionNamemain 分支历史gh api 手工操作 Git refsgit push origin main "v${current_version}" 触发远程发布流程