Release patch
Skill StringKe/std-agent/.agents/skills/commands/release-patch
走 stdagent 标准化 patch 发版流程(CI 验证 -> tag -> goreleaser -> 验收) (Invoke when user types /release-patch or asks to run release-patch)From its SKILL.md
npx -y skills add StringKe/std-agent --skill release-patchAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
3 things to look at
- 8 stars8 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 8 commands, including `git status` and 7 more.
- fetches URLsInstructs the agent to fetch 1 URL, including https://raw.githubusercontent.com/StringKe/std-agent/main/install.sh.
SKILL.md
2.1 KB, 613 tokens by cl100k_base, as published. Nobody here has run it
/release-patch
发一个 patch 版本(v0.0.X -> v0.0.X+1)。流程:
1. 前置检查
git status # 必须 clean
git log origin/main..HEAD # 应当为空(已 push)
gh run list --branch main --limit 1
# 必须 status=completed conclusion=success,否则停在这里
2. 确定版本号
git tag --sort=-v:refname | head -1
得到当前最新 tag,自动 +1(仅 patch)。例如:v0.0.3 -> v0.0.4。
3. 打 tag 并 push
NEXT=v0.0.4
git tag -a "$NEXT" -m "release $NEXT"
git push origin "$NEXT"
push tag 会触发 .github/workflows/release.yml(goreleaser),自动:
- 跨平台构建(darwin/linux/windows × amd64/arm64)
- 生成 sha256 校验
- 发 GitHub Release(含 CHANGELOG_LATEST.md 内容)
4. 验收
gh release view "$NEXT" # 看 release page 是否生成
gh run list --workflow=release.yml --limit 1
确认:
- Release 页面有 assets(每平台 .tar.gz / .zip + checksums.txt)
- install.sh 能拉到新版本:
curl -fsSL https://raw.githubusercontent.com/StringKe/std-agent/main/install.sh | sh ./bin/stdagent version显示新版本号
5. 不要做的事
- 不在已推送 commit 上 amend / rebase(HARD RULE)
- tag 一旦 push 不要删(goreleaser 已触发即不可撤回,要修发更高 patch 覆盖)
- 跳过 CI 直接打 tag(应当先验证 CI 全绿)
异常处理
- CI fail 在 main:先修 fail commit 再发版(不要带着已知 fail 打 tag)
- goreleaser fail 但 tag 已 push:在 GitHub Actions 重跑 release.yml;仍 fail 就发更高 patch
- 已有 release 但要补内容:发更高 patch(v0.0.X+1),不要修旧 release
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.