2.6 KiB
2.6 KiB
name, description
| name | description |
|---|---|
| yayacal-release | Use when the user asks to release a new version of the yayacal Android calendar app |
YaYa Release
Overview
One-shot local release workflow for the yayacal Android app. All steps run on the developer machine using gh CLI.
When to Use
- User says something like "发布 1.2.0", "release v1.3.0", "发一个新版本".
- Working in
/Users/issuser/Developer/xfy/yayacal.
Release Steps
- Confirm version number with the user if not provided.
- Update version numbers:
gradle.properties:app.version.base=x.y.zapp/build.gradle.kts: incrementversionCodeby 1
- Update
CHANGELOG.md:- Compare commits since the last tag:
git log <last-tag>..HEAD --pretty=format:"%s" - Group into Added / Changed / Fixed
- Insert
## [x.y.z] - YYYY-MM-DDbelow## [Unreleased] - Append
[x.y.z]: https://github.com/xfy/yayacal/releases/tag/vx.y.zat the bottom
- Compare commits since the last tag:
- Commit with the exact message:
git add CHANGELOG.md gradle.properties app/build.gradle.kts git commit -m "release: vx.y.z" - Tag and push (lightweight tag, matching previous releases):
git tag vx.y.z git push origin main --tags - Build release APK:
./gradlew :app:assembleRelease - Create GitHub Release with the current version's CHANGELOG as body:
python3 - <<'PY' import re content = open('CHANGELOG.md').read() m = re.search(r'## \[x.y.z\] - .*?\n(.*?)\n## \[', content, re.DOTALL) open('/tmp/vx.y.z-notes.md', 'w').write(m.group(1).strip()) PY gh release create vx.y.z \ app/build/outputs/apk/release/app-release.apk \ --title "YaYa vx.y.z" \ --notes-file /tmp/vx.y.z-notes.md
Quick Reference
| Item | Value |
|---|---|
| Version base | gradle.properties → app.version.base |
| Version code | app/build.gradle.kts → versionCode |
| APK path | app/build/outputs/apk/release/app-release.apk |
| Commit message | release: vx.y.z |
| Tag format | lightweight vx.y.z |
| Release title | YaYa vx.y.z |
| Signing | Keep existing debug signing; do not add release keystore logic |
Common Mistakes
- Wrong commit message: Do not use
chore(release): ...orbuild: .... Use exactlyrelease: vx.y.z. - Annotated tag: Previous releases use lightweight tags; do not add
-a. - Empty release body: Always extract the current version's CHANGELOG section and pass it to
--notes-file. - Releasing from a dirty tree: Run
git statusfirst; only release from a cleanmainbranch. - Forgetting to push the tag:
git push origin main --tagsis required.