Release Version Workflow
Overview
A complete release workflow for MioSub that handles version bumping, changelog generation from git history, grouped commits, tagging, and GitHub CI monitoring.
When to Use
- User says "发布新版本", "release", "发版"
- User requests a version release
- Before publishing a new release to GitHub
Workflow Steps
Step 0: Pre-flight Questions
Ask the user:
- Version number - What version to release? (e.g., 2.12.0)
- Pre-release? - Is this a pre-release version? (affects GitHub release settings)
Step 1: Check and Commit Uncommitted Changes
- Run
git status to check for uncommitted changes
- If changes exist:
- Analyze the changes by topic/feature
- Group related changes together
- Create separate commits for each topic group
- Use conventional commit messages (feat:, fix:, chore:, etc.)
Step 2: Generate Changelog
Find the previous version tag:
git describe --tags --abbrev=0
Get all commits since last tag:
git log <previous-tag>..HEAD --oneline
Read each commit's details to categorize:
- Features - New functionality (feat:)
- Fixes - Bug fixes (fix:)
- Refactor - Code improvements (refactor:)
- Chore - Maintenance tasks (chore:)
- Documentation - Doc updates (docs:)
- Performance - Performance improvements (perf:)
Exclude from changelog (internal/infrastructure changes not relevant to users):
- Error tracking changes (Sentry integration, error reporting)
- Analytics/telemetry service modifications
- Internal monitoring or logging infrastructure
Update changelog files in the documentation site (bilingual):
English (docs/content/docs/en/changelog.mdx):
- Add new version section after the frontmatter and intro paragraph
- Format:
## [X.X.X] - YYYY-MM-DD (no 'v' prefix)
- Group entries by category (Keep a Changelog format)
- Use English descriptions
Chinese (docs/content/docs/zh/changelog.mdx):
- Mirror the same structure as English
- Translate all descriptions to Chinese
- Use Chinese category names: 新功能, 修复, 重构, 杂项, 文档, 性能
Update package.json:
- Change
"version": "X.X.X" to new version (no 'v' prefix)
Step 3: Commit Release Files
git add docs/content/docs/en/changelog.mdx docs/content/docs/zh/changelog.mdx package.json
git commit -m "Release vX.X.X"
Note: Commit message uses 'v' prefix, but version strings in files do not.
Step 4: Tag and Push
git tag vX.X.X
git push origin main
git push origin vX.X.X
Note: Tag uses 'v' prefix (e.g., v2.12.0).
Step 5: Monitor GitHub CI
Track the GitHub Actions workflow:
gh run list --workflow=release.yml --limit=1
gh run watch <run-id>
Report build status to user:
- Success: Provide release URL
- Failure: Show error details
Quick Reference
| Step |
Command |
Purpose |
| Check status |
git status |
Find uncommitted changes |
| Previous tag |
git describe --tags --abbrev=0 |
Get last release tag |
| Commit log |
git log <tag>..HEAD --oneline |
List changes since release |
| Create tag |
git tag vX.X.X |
Create version tag |
| Push tag |
git push origin vX.X.X |
Trigger CI build |
| Watch CI |
gh run watch |
Monitor build progress |
Version Format Rules
| Location |
Format |
Example |
| Git tag |
With 'v' prefix |
v2.12.0 |
| Commit message |
With 'v' prefix |
Release v2.12.0 |
| changelog.mdx (en/zh) |
No 'v' prefix |
## [2.12.0] - 2026-01-06 |
| package.json |
No 'v' prefix |
"version": "2.12.0" |
Changelog File Locations
| Language |
Path |
| English |
docs/content/docs/en/changelog.mdx |
| Chinese |
docs/content/docs/zh/changelog.mdx |
CHANGELOG Format (English)
## [X.X.X] - YYYY-MM-DD
### Features
- **Component**: Description of new feature.
### Fixes
- **Component**: Description of bug fix.
### Refactor
- **Component**: Description of refactoring.
### Chore
- **Component**: Maintenance description.
CHANGELOG Format (Chinese)
## [X.X.X] - YYYY-MM-DD
### 新功能
- **组件名**: 新功能描述。
### 修复
- **组件名**: Bug 修复描述。
### 重构
- **组件名**: 重构描述。
### 杂项
- **组件名**: 维护工作描述。
Category Name Mapping
| English |
Chinese |
| Features |
新功能 |
| Fixes |
修复 |
| Refactor |
重构 |
| Chore |
杂项 |
| Documentation |
文档 |
| Performance |
性能 |
| Highlights |
亮点 |
| Improvements |
改进 |
| Other Changes |
其他变更 |
Common Mistakes
| Mistake |
Fix |
| Forgetting to push the tag |
CI only triggers on tag push, not commit push |
| Wrong version in package.json |
Version must match tag (without 'v' prefix) |
| Changelog in wrong position |
New version goes after the frontmatter, before previous versions |
| Not grouping commits |
Related changes should be in one commit for cleaner history |
| Inconsistent 'v' prefix |
Tag and commit use 'v', files don't |
| Missing Chinese translation |
Both en and zh changelog files must be updated together |
| Mismatched category translations |
Use the Category Name Mapping table for consistency |
Pre-release Handling
For pre-release versions:
- Use version format:
X.X.X-beta.1, X.X.X-rc.1
- Tag format:
vX.X.X-beta.1
- Note: Current CI workflow sets
prerelease: false - may need manual adjustment in GitHub release
1---2name: release-version3description: Use when releasing a new version - guides through version bump, changelog generation, commit grouping, tagging, and GitHub CI tracking. Triggers on "发布新版本", "release", "发版", or version release requests.4---56# Release Version Workflow78## Overview910A complete release workflow for MioSub that handles version bumping, changelog generation from git history, grouped commits, tagging, and GitHub CI monitoring.1112## When to Use1314- User says "发布新版本", "release", "发版"15- User requests a version release16- Before publishing a new release to GitHub1718## Workflow Steps1920### Step 0: Pre-flight Questions2122Ask the user:23241. **Version number** - What version to release? (e.g., 2.12.0)252. **Pre-release?** - Is this a pre-release version? (affects GitHub release settings)2627### Step 1: Check and Commit Uncommitted Changes28291. Run `git status` to check for uncommitted changes302. If changes exist:31 - Analyze the changes by topic/feature32 - Group related changes together33 - Create separate commits for each topic group34 - Use conventional commit messages (feat:, fix:, chore:, etc.)3536### Step 2: Generate Changelog37381. Find the previous version tag:3940 ```bash41 git describe --tags --abbrev=042 ```43442. Get all commits since last tag:4546 ```bash47 git log <previous-tag>..HEAD --oneline48 ```49503. Read each commit's details to categorize:51 - **Features** - New functionality (feat:)52 - **Fixes** - Bug fixes (fix:)53 - **Refactor** - Code improvements (refactor:)54 - **Chore** - Maintenance tasks (chore:)55 - **Documentation** - Doc updates (docs:)56 - **Performance** - Performance improvements (perf:)5758 **Exclude from changelog** (internal/infrastructure changes not relevant to users):59 - Error tracking changes (Sentry integration, error reporting)60 - Analytics/telemetry service modifications61 - Internal monitoring or logging infrastructure62634. Update changelog files in the documentation site (bilingual):6465 **English** (`docs/content/docs/en/changelog.mdx`):66 - Add new version section after the frontmatter and intro paragraph67 - Format: `## [X.X.X] - YYYY-MM-DD` (no 'v' prefix)68 - Group entries by category (Keep a Changelog format)69 - Use English descriptions7071 **Chinese** (`docs/content/docs/zh/changelog.mdx`):72 - Mirror the same structure as English73 - Translate all descriptions to Chinese74 - Use Chinese category names: 新功能, 修复, 重构, 杂项, 文档, 性能75765. Update `package.json`:77 - Change `"version": "X.X.X"` to new version (no 'v' prefix)7879### Step 3: Commit Release Files8081```bash82git add docs/content/docs/en/changelog.mdx docs/content/docs/zh/changelog.mdx package.json83git commit -m "Release vX.X.X"84```8586Note: Commit message uses 'v' prefix, but version strings in files do not.8788### Step 4: Tag and Push8990```bash91git tag vX.X.X92git push origin main93git push origin vX.X.X94```9596Note: Tag uses 'v' prefix (e.g., v2.12.0).9798### Step 5: Monitor GitHub CI991001. Track the GitHub Actions workflow:101102 ```bash103 gh run list --workflow=release.yml --limit=1104 gh run watch <run-id>105 ```1061072. Report build status to user:108 - Success: Provide release URL109 - Failure: Show error details110111## Quick Reference112113| Step | Command | Purpose |114| ------------ | -------------------------------- | -------------------------- |115| Check status | `git status` | Find uncommitted changes |116| Previous tag | `git describe --tags --abbrev=0` | Get last release tag |117| Commit log | `git log <tag>..HEAD --oneline` | List changes since release |118| Create tag | `git tag vX.X.X` | Create version tag |119| Push tag | `git push origin vX.X.X` | Trigger CI build |120| Watch CI | `gh run watch` | Monitor build progress |121122## Version Format Rules123124| Location | Format | Example |125| --------------------- | --------------- | -------------------------- |126| Git tag | With 'v' prefix | `v2.12.0` |127| Commit message | With 'v' prefix | `Release v2.12.0` |128| changelog.mdx (en/zh) | No 'v' prefix | `## [2.12.0] - 2026-01-06` |129| package.json | No 'v' prefix | `"version": "2.12.0"` |130131## Changelog File Locations132133| Language | Path |134| -------- | ------------------------------------ |135| English | `docs/content/docs/en/changelog.mdx` |136| Chinese | `docs/content/docs/zh/changelog.mdx` |137138## CHANGELOG Format (English)139140```markdown141## [X.X.X] - YYYY-MM-DD142143### Features144145- **Component**: Description of new feature.146147### Fixes148149- **Component**: Description of bug fix.150151### Refactor152153- **Component**: Description of refactoring.154155### Chore156157- **Component**: Maintenance description.158```159160## CHANGELOG Format (Chinese)161162```markdown163## [X.X.X] - YYYY-MM-DD164165### 新功能166167- **组件名**: 新功能描述。168169### 修复170171- **组件名**: Bug 修复描述。172173### 重构174175- **组件名**: 重构描述。176177### 杂项178179- **组件名**: 维护工作描述。180```181182## Category Name Mapping183184| English | Chinese |185| ------------- | -------- |186| Features | 新功能 |187| Fixes | 修复 |188| Refactor | 重构 |189| Chore | 杂项 |190| Documentation | 文档 |191| Performance | 性能 |192| Highlights | 亮点 |193| Improvements | 改进 |194| Other Changes | 其他变更 |195196## Common Mistakes197198| Mistake | Fix |199| -------------------------------- | ---------------------------------------------------------------- |200| Forgetting to push the tag | CI only triggers on tag push, not commit push |201| Wrong version in package.json | Version must match tag (without 'v' prefix) |202| Changelog in wrong position | New version goes after the frontmatter, before previous versions |203| Not grouping commits | Related changes should be in one commit for cleaner history |204| Inconsistent 'v' prefix | Tag and commit use 'v', files don't |205| Missing Chinese translation | Both en and zh changelog files must be updated together |206| Mismatched category translations | Use the Category Name Mapping table for consistency |207208## Pre-release Handling209210For pre-release versions:211212- Use version format: `X.X.X-beta.1`, `X.X.X-rc.1`213- Tag format: `vX.X.X-beta.1`214- Note: Current CI workflow sets `prerelease: false` - may need manual adjustment in GitHub release