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`.4metadata:5 source: https://skillmd.com/skills/cherryhq/prepare-release6---78# Prepare Release910Automate the Cherry Studio release workflow: collect changes → generate bilingual release notes → update files → create release branch + PR → trigger CI/CD.1112## Arguments1314Parse the version intent from the user's message. Accept any of these forms:15- Bump type keyword: `patch`, `minor`, `major`16- 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`)17- Natural language: "prepare a beta release", "bump to 1.8.0-rc.2", etc.1819Defaults to `patch` if no version is specified. Always echo the resolved target version back to the user before proceeding with any file edits.2021- `--dry-run`: Preview only, do not create branch or PR.2223## Workflow2425### Step 1: Determine Version26271. Get the latest tag:28 ```bash29 git describe --tags --abbrev=030 ```312. Read current version from `package.json`.323. Compute the new version based on the argument:33 - `patch` / `minor` / `major`: bump from the current tag version.34 - `x.y.z` or `x.y.z-pre.N`: use as-is after validating it is valid semver.3536### Step 2: Collect Commits37381. List all commits since the last tag:39 ```bash40 git log <last-tag>..HEAD --format="%H %s" --no-merges41 ```422. For each commit, get the full body:43 ```bash44 git log <hash> -1 --format="%B"45 ```463. Extract the content inside `` ```release-note `` code blocks from each commit body.474. Extract the conventional commit type from the title (`feat`, `fix`, `refactor`, `perf`, `docs`, etc.).485. **Skip** these commits:49 - Titles starting with `🤖 Daily Auto I18N`50 - Titles starting with `Merge`51 - Titles starting with `chore(deps)`52 - Titles starting with `chore: release`53 - Commits where the release-note block says `NONE`5455### Step 3: Generate Bilingual Release Notes5657Using the collected commit information, generate release notes in **both English and Chinese**.5859**Format** (must match exactly):6061```62<!--LANG:en-->63Cherry Studio {version} - {Brief English Title}6465✨ New Features66- [Component] Description6768🐛 Bug Fixes69- [Component] Description7071💄 Improvements72- [Component] Description7374⚡ Performance75- [Component] Description7677<!--LANG:zh-CN-->78Cherry Studio {version} - {简短中文标题}7980✨ 新功能81- [组件] 描述8283🐛 问题修复84- [组件] 描述8586💄 改进87- [组件] 描述8889⚡ 性能优化90- [组件] 描述91<!--LANG:END-->92```9394**Rules:**95- Only include categories that have entries (omit empty categories).96- Each commit appears as exactly ONE line item in the appropriate category.97- Use the `release-note` field if present; otherwise summarize from the commit title.98- Component tags should be short: `[Chat]`, `[Models]`, `[Agent]`, `[MCP]`, `[Settings]`, `[Data]`, `[Build]`, etc.99- Chinese translations should be natural, not machine-literal.100- Do NOT include commit hashes or PR numbers.101- Read the **existing** release notes in `electron-builder.yml` as a style reference before writing.102103**IMPORTANT: User-Focused Content Only**104105Release notes are for **end users**, not developers. Exclude anything users don't care about:106107- **EXCLUDE** internal refactoring, code cleanup, or architecture changes108- **EXCLUDE** CI/CD, build tooling, or test infrastructure changes109- **EXCLUDE** dependency updates (unless they add user-visible features)110- **EXCLUDE** documentation updates111- **EXCLUDE** developer experience improvements112- **EXCLUDE** technical debt fixes with no user-visible impact113- **EXCLUDE** overly technical descriptions (e.g., "fix race condition in Redux middleware")114115**INCLUDE** only changes that users will notice:116- New features they can use117- Bug fixes that affected their workflow118- UI/UX improvements they can see119- Performance improvements they can feel120- Security fixes (simplified, without implementation details)121122**Keep descriptions simple and non-technical:**123- ❌ "Fix streaming race condition causing partial tool response status in Redux state"124- ✅ "Fix tool status not stopping when aborting"125- ❌ "Auto-convert reasoning_effort to reasoningEffort for OpenAI-compatible providers"126- ✅ "Fix deep thinking mode not working with some providers"127128### Step 4: Update Files1291301. **`package.json`**: Update the `"version"` field to the new version.1312. **`electron-builder.yml`**: Replace the content under `releaseInfo.releaseNotes: |` with the generated notes. Preserve the 4-space YAML indentation for the block scalar content.132133### Step 5: Present for Review134135Show the user:136- The new version number.137- The full generated release notes.138- A summary of which files were modified.139140If `--dry-run` was specified, stop here.141142Otherwise, ask the user to confirm before proceeding to Step 6.143144### Step 6: Create Branch and PR1451461. Create and push the release branch:147 ```bash148 git checkout -b release/v{version}149 git add package.json electron-builder.yml150 git commit -m "chore: release v{version}"151 git push -u origin release/v{version}152 ```1532. 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.154 - Use title: `chore: release v{version}`155 - Use base branch: `main`156 - When filling the PR template, incorporate:157 - The generated release notes (English section only, for readability).158 - A list of included commits.159 - A review checklist:160 - [ ] Review generated release notes in `electron-builder.yml`161 - [ ] Verify version bump in `package.json`162 - [ ] CI passes163 - [ ] Merge to trigger release build1643. Report the PR URL and next steps.165166## CI Trigger Chain167168Creating a PR from `release/v*` to `main` automatically triggers:169- **`release.yml`**: Builds on macOS, Windows, Linux and creates a draft GitHub Release.170- **`ci.yml`**: Runs lint, typecheck, and tests.171172## Constraints173174- Always read `electron-builder.yml` before modifying it to understand the current format.175- Never modify files other than `package.json` and `electron-builder.yml`.176- Never push directly to `main`.177- Always show the generated release notes to the user before creating the branch/PR (unless running in CI with no interactive user).178