Prepare Release
Automate the Cherry Studio release workflow: collect changes → generate bilingual release notes → update files → create release branch + PR → trigger CI/CD.
Arguments
Parse the version intent from the user's message. Accept any of these forms:
- Bump type keyword:
patch, minor, major
- Exact version:
x.y.z or x.y.z-pre.N (e.g. 1.8.0, 1.8.0-beta.1, 1.8.0-rc.1)
- Natural language: "prepare a beta release", "bump to 1.8.0-rc.2", etc.
Defaults to patch if no version is specified. Always echo the resolved target version back to the user before proceeding with any file edits.
--dry-run: Preview only, do not create branch or PR.
Workflow
Step 1: Determine Version
- Get the latest tag:
git describe --tags --abbrev=0
- Read current version from
package.json.
- Compute the new version based on the argument:
patch / minor / major: bump from the current tag version.
x.y.z or x.y.z-pre.N: use as-is after validating it is valid semver.
Step 2: Collect Commits
- List all commits since the last tag:
git log <last-tag>..HEAD --format="%H %s" --no-merges
- For each commit, get the full body:
git log <hash> -1 --format="%B"
- Extract the content inside
```release-note code blocks from each commit body.
- Extract the conventional commit type from the title (
feat, fix, refactor, perf, docs, etc.).
- Skip these commits:
- Titles starting with
🤖 Daily Auto I18N
- Titles starting with
Merge
- Titles starting with
chore(deps)
- Titles starting with
chore: release
- Commits where the release-note block says
NONE
Step 3: Generate Bilingual Release Notes
Using the collected commit information, generate release notes in both English and Chinese.
Format (must match exactly):
<!--LANG:en-->
Cherry Studio {version} - {Brief English Title}
✨ New Features
- [Component] Description
🐛 Bug Fixes
- [Component] Description
💄 Improvements
- [Component] Description
⚡ Performance
- [Component] Description
<!--LANG:zh-CN-->
Cherry Studio {version} - {简短中文标题}
✨ 新功能
- [组件] 描述
🐛 问题修复
- [组件] 描述
💄 改进
- [组件] 描述
⚡ 性能优化
- [组件] 描述
<!--LANG:END-->
Rules:
- Only include categories that have entries (omit empty categories).
- Each commit appears as exactly ONE line item in the appropriate category.
- Use the
release-note field if present; otherwise summarize from the commit title.
- Component tags should be short:
[Chat], [Models], [Agent], [MCP], [Settings], [Data], [Build], etc.
- Chinese translations should be natural, not machine-literal.
- Do NOT include commit hashes or PR numbers.
- Read the existing release notes in
electron-builder.yml as a style reference before writing.
IMPORTANT: User-Focused Content Only
Release notes are for end users, not developers. Exclude anything users don't care about:
- EXCLUDE internal refactoring, code cleanup, or architecture changes
- EXCLUDE CI/CD, build tooling, or test infrastructure changes
- EXCLUDE dependency updates (unless they add user-visible features)
- EXCLUDE documentation updates
- EXCLUDE developer experience improvements
- EXCLUDE technical debt fixes with no user-visible impact
- EXCLUDE overly technical descriptions (e.g., "fix race condition in Redux middleware")
INCLUDE only changes that users will notice:
- New features they can use
- Bug fixes that affected their workflow
- UI/UX improvements they can see
- Performance improvements they can feel
- Security fixes (simplified, without implementation details)
Keep descriptions simple and non-technical:
- ❌ "Fix streaming race condition causing partial tool response status in Redux state"
- ✅ "Fix tool status not stopping when aborting"
- ❌ "Auto-convert reasoning_effort to reasoningEffort for OpenAI-compatible providers"
- ✅ "Fix deep thinking mode not working with some providers"
Step 4: Update Files
package.json: Update the "version" field to the new version.
electron-builder.yml: Replace the content under releaseInfo.releaseNotes: | with the generated notes. Preserve the 4-space YAML indentation for the block scalar content.
Step 5: Present for Review
Show the user:
- The new version number.
- The full generated release notes.
- A summary of which files were modified.
If --dry-run was specified, stop here.
Otherwise, ask the user to confirm before proceeding to Step 6.
Step 6: Create Branch and PR
- Create and push the release branch:
git checkout -b release/v{version}
git add package.json electron-builder.yml
git commit -m "chore: release v{version}"
git push -u origin release/v{version}
- Create the PR using the
gh-create-pr skill. If the skill tool is unavailable, read .agents/skills/gh-create-pr/SKILL.md and follow it manually. In CI (non-interactive) mode, skip interactive confirmation steps and create the PR directly after filling the template.
- Use title:
chore: release v{version}
- Use base branch:
main
- When filling the PR template, incorporate:
- The generated release notes (English section only, for readability).
- A list of included commits.
- A review checklist:
- Report the PR URL and next steps.
CI Trigger Chain
Creating a PR from release/v* to main automatically triggers:
release.yml: Builds on macOS, Windows, Linux and creates a draft GitHub Release.
ci.yml: Runs lint, typecheck, and tests.
Constraints
- Always read
electron-builder.yml before modifying it to understand the current format.
- Never modify files other than
package.json and electron-builder.yml.
- Never push directly to
main.
- Always show the generated release notes to the user before creating the branch/PR (unless running in CI with no interactive user).
1---2name: prepare-release3description: Prepare a new release by collecting commits, generating bilingual release notes, updating version files, and creating a release branch with PR. Use when asked to prepare/create a release, bump version, or run `/prepare-release`.4---56# Prepare Release78Automate the Cherry Studio release workflow: collect changes → generate bilingual release notes → update files → create release branch + PR → trigger CI/CD.910## Arguments1112Parse the version intent from the user's message. Accept any of these forms:13- Bump type keyword: `patch`, `minor`, `major`14- Exact version: `x.y.z` or `x.y.z-pre.N` (e.g. `1.8.0`, `1.8.0-beta.1`, `1.8.0-rc.1`)15- Natural language: "prepare a beta release", "bump to 1.8.0-rc.2", etc.1617Defaults to `patch` if no version is specified. Always echo the resolved target version back to the user before proceeding with any file edits.1819- `--dry-run`: Preview only, do not create branch or PR.2021## Workflow2223### Step 1: Determine Version24251. Get the latest tag:26 ```bash27 git describe --tags --abbrev=028 ```292. Read current version from `package.json`.303. Compute the new version based on the argument:31 - `patch` / `minor` / `major`: bump from the current tag version.32 - `x.y.z` or `x.y.z-pre.N`: use as-is after validating it is valid semver.3334### Step 2: Collect Commits35361. List all commits since the last tag:37 ```bash38 git log <last-tag>..HEAD --format="%H %s" --no-merges39 ```402. For each commit, get the full body:41 ```bash42 git log <hash> -1 --format="%B"43 ```443. Extract the content inside `` ```release-note `` code blocks from each commit body.454. Extract the conventional commit type from the title (`feat`, `fix`, `refactor`, `perf`, `docs`, etc.).465. **Skip** these commits:47 - Titles starting with `🤖 Daily Auto I18N`48 - Titles starting with `Merge`49 - Titles starting with `chore(deps)`50 - Titles starting with `chore: release`51 - Commits where the release-note block says `NONE`5253### Step 3: Generate Bilingual Release Notes5455Using the collected commit information, generate release notes in **both English and Chinese**.5657**Format** (must match exactly):5859```60<!--LANG:en-->61Cherry Studio {version} - {Brief English Title}6263✨ New Features64- [Component] Description6566🐛 Bug Fixes67- [Component] Description6869💄 Improvements70- [Component] Description7172⚡ Performance73- [Component] Description7475<!--LANG:zh-CN-->76Cherry Studio {version} - {简短中文标题}7778✨ 新功能79- [组件] 描述8081🐛 问题修复82- [组件] 描述8384💄 改进85- [组件] 描述8687⚡ 性能优化88- [组件] 描述89<!--LANG:END-->90```9192**Rules:**93- Only include categories that have entries (omit empty categories).94- Each commit appears as exactly ONE line item in the appropriate category.95- Use the `release-note` field if present; otherwise summarize from the commit title.96- Component tags should be short: `[Chat]`, `[Models]`, `[Agent]`, `[MCP]`, `[Settings]`, `[Data]`, `[Build]`, etc.97- Chinese translations should be natural, not machine-literal.98- Do NOT include commit hashes or PR numbers.99- Read the **existing** release notes in `electron-builder.yml` as a style reference before writing.100101**IMPORTANT: User-Focused Content Only**102103Release notes are for **end users**, not developers. Exclude anything users don't care about:104105- **EXCLUDE** internal refactoring, code cleanup, or architecture changes106- **EXCLUDE** CI/CD, build tooling, or test infrastructure changes107- **EXCLUDE** dependency updates (unless they add user-visible features)108- **EXCLUDE** documentation updates109- **EXCLUDE** developer experience improvements110- **EXCLUDE** technical debt fixes with no user-visible impact111- **EXCLUDE** overly technical descriptions (e.g., "fix race condition in Redux middleware")112113**INCLUDE** only changes that users will notice:114- New features they can use115- Bug fixes that affected their workflow116- UI/UX improvements they can see117- Performance improvements they can feel118- Security fixes (simplified, without implementation details)119120**Keep descriptions simple and non-technical:**121- ❌ "Fix streaming race condition causing partial tool response status in Redux state"122- ✅ "Fix tool status not stopping when aborting"123- ❌ "Auto-convert reasoning_effort to reasoningEffort for OpenAI-compatible providers"124- ✅ "Fix deep thinking mode not working with some providers"125126### Step 4: Update Files1271281. **`package.json`**: Update the `"version"` field to the new version.1292. **`electron-builder.yml`**: Replace the content under `releaseInfo.releaseNotes: |` with the generated notes. Preserve the 4-space YAML indentation for the block scalar content.130131### Step 5: Present for Review132133Show the user:134- The new version number.135- The full generated release notes.136- A summary of which files were modified.137138If `--dry-run` was specified, stop here.139140Otherwise, ask the user to confirm before proceeding to Step 6.141142### Step 6: Create Branch and PR1431441. Create and push the release branch:145 ```bash146 git checkout -b release/v{version}147 git add package.json electron-builder.yml148 git commit -m "chore: release v{version}"149 git push -u origin release/v{version}150 ```1512. Create the PR using the `gh-create-pr` skill. If the skill tool is unavailable, read `.agents/skills/gh-create-pr/SKILL.md` and follow it manually. In CI (non-interactive) mode, skip interactive confirmation steps and create the PR directly after filling the template.152 - Use title: `chore: release v{version}`153 - Use base branch: `main`154 - When filling the PR template, incorporate:155 - The generated release notes (English section only, for readability).156 - A list of included commits.157 - A review checklist:158 - [ ] Review generated release notes in `electron-builder.yml`159 - [ ] Verify version bump in `package.json`160 - [ ] CI passes161 - [ ] Merge to trigger release build1623. Report the PR URL and next steps.163164## CI Trigger Chain165166Creating a PR from `release/v*` to `main` automatically triggers:167- **`release.yml`**: Builds on macOS, Windows, Linux and creates a draft GitHub Release.168- **`ci.yml`**: Runs lint, typecheck, and tests.169170## Constraints171172- Always read `electron-builder.yml` before modifying it to understand the current format.173- Never modify files other than `package.json` and `electron-builder.yml`.174- Never push directly to `main`.175- Always show the generated release notes to the user before creating the branch/PR (unless running in CI with no interactive user).176