-
Get the latest tag:
git tag --list --sort=-version:refname | head -1
-
Get commits since last tag:
git log <latest-tag>..HEAD --oneline
-
Calculate next version based on latest tag:
- Parse current version vX.Y.Z from step 1
- Default: increment patch (Z+1), e.g. v0.3.2 → v0.3.3
- Minor: increment minor, reset patch (Y+1, Z=0), e.g. v0.3.2 → v0.4.0
- Major: increment major, reset others (X+1, Y=0, Z=0), e.g. v0.3.2 → v1.0.0
-
Show suggested version to user, allow modification before proceeding
-
Categorize commits by type:
feat: → New Features / 新功能
fix: → Bug Fixes / 问题修复
-
Update CHANGELOG.md (insert new version entry after # Changelog heading):
- Use bilingual format (English / 中文) for each item
- Format:
## vX.Y.Z followed by **New Features / 新功能** and **Bug Fixes / 问题修复** sections
- Each item format:
- English description / 中文描述
- Translation terminology: "Channel" must be translated as "渠道" (NOT "频道")
- This file is used by GitHub Actions to generate release notes for auto-updater
-
(Conditional) If this release includes significant new features or major changes, update the feature descriptions in both README files:
- README.md — Update relevant feature sections in Chinese
- README_EN.md — Update relevant feature sections in English
- Only update feature/capability descriptions, NOT the changelog section (both READMEs already link to CHANGELOG.md for full changelog)
-
Commit changelog changes (required before release:prepare):
git add CHANGELOG.md README.md README_EN.md
git add CHANGELOG.md
git commit -m "docs: update changelog for <version>"
-
Run release workflow:
npm run release:prepare <version>
-
Execute git commands to complete release:
git add .
git commit -m "chore: release <version>"
git tag <version>
git push origin main --tags