Create version updates and release commits under LLM leadership, and complete tagging, Release, and distribution via the workflow.
Preflight
gh auth statussucceedsgit status --shortis emptyorigin/developcan be updated to the latest
Flow
release (/release) 実行
↓
① origin/develop を pull してローカルを最新化
↓
② バージョン更新(Cargo.toml, CHANGELOG.md)
↓
③ chore(release): vX.Y.Z コミット作成
↓
④ Closing Issue を収集
↓
⑤ develop → main マージ(PR本文に Closing Issues 記載)
↓
⑥ release.yml がタグ作成 → GitHub Release作成
↓
⑦ publish.yml がバイナリビルド → Release にアタッチ
Procedure
0. Update local to the latest (required)
git fetch origin
git pull origin develop
1. Version update
[workspace.package]
version = "X.Y.Z"
2. Update CHANGELOG.md
## [X.Y.Z] - YYYY-MM-DD
### Added
- 新機能の説明
### Fixed
- バグ修正の説明
3. Create release commit
git add Cargo.toml Cargo.lock CHANGELOG.md
git commit -m "chore(release): vX.Y.Z"
git push origin develop
4. Collect Closing Issues
- Extract PR numbers from commits between the previous tag and HEAD
LAST_TAG=$(git describe --tags --abbrev=0)
PR_NUMBERS=$(git log ${LAST_TAG}..HEAD --oneline \
| grep -oE '(#[0-9]+)|\bMerge pull request #[0-9]+' \
| grep -oE '[0-9]+' | sort -u)
- Extract closing keywords from each PR body
CLOSING_ISSUES=""
for pr in $PR_NUMBERS; do
BODY=$(gh pr view "$pr" --json body -q '.body' 2>/dev/null || true)
ISSUES=$(echo "$BODY" \
| grep -oiE '(close[sd]?|fix(e[sd])?|resolve[sd]?)\s+#[0-9]+' \
| grep -oE '[0-9]+' || true)
CLOSING_ISSUES="$CLOSING_ISSUES $ISSUES"
done
CLOSING_ISSUES=$(echo "$CLOSING_ISSUES" | tr ' ' '\n' | sort -u | grep -v '^$')
- Exclude PR numbers and keep only Issues
REAL_ISSUES=""
for num in $CLOSING_ISSUES; do
IS_PR=$(gh api "repos/{owner}/{repo}/issues/$num" \
--jq 'has("pull_request") and .pull_request != null' 2>/dev/null || echo "false")
if [ "$IS_PR" = "false" ]; then
REAL_ISSUES="$REAL_ISSUES $num"
fi
done
- Output for PR body
for num in $REAL_ISSUES; do
echo "Closes #$num"
done
5. Merge into main
# 推奨: 既存スクリプト経由
./scripts/prepare-release.sh
# または prepare-release workflow を直接起動
gh workflow run prepare-release.yml
# 手動PR作成の場合
gh pr create --base main --head develop \
--title "chore(release): vX.Y.Z"
6. Distribution confirmation
gh release view vX.Y.Zgh run list --workflow=publish.yml --limit 3- GitHub Releases
Notes
- The version is Semantic Versioning follow
chore(release):prefix is required (trigger condition for release.yml)gh auth loginmust be completed