Skip to main content

ccswitcher-release

This skill should be used when releasing a new version of CC-Switcher, creating git tags for releases, managing semantic versioning, running the release workflow, or fixing failed releases. Use when asked to "release", "tag version", "bump version", "create release", "publish new version", "retrigger release", or "fix failed build".

Informações da origem

Repositório
atom2ueki/cc-switcher
Última atividade na origem
5 de março de 2026 às 18:13
Idioma detectado do SKILL.md
inglês
Estrelas
0
Forks
0

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
name
ccswitcher-release
description
This skill should be used when releasing a new version of CC-Switcher, creating git tags for releases, managing semantic versioning, running the release workflow, or fixing failed releases. Use when asked to "release", "tag version", "bump version", "create release", "publish new version", "retrigger release", or "fix failed build".
version
1.1.0
# CC-Switcher Release Guide Manage version releases for CC-Switcher using semantic versioning. ## Version Strategy **Single source of truth: Cargo.toml** The version is defined in `Cargo.toml`: ```toml [package] version = "1.2.0" ``` ## When to Bump Version | Change Type | Example | Version Bump | |------------|---------|--------------| | **Patch** | Bug fixes, small improvements | 1.0.0 → 1.0.1 | | **Minor** | New features, backward compatible | 1.0.0 → 1.1.0 | | **Major** | Breaking changes | 1.0.0 → 2.0.0 | **IMPORTANT: Never bump version if the previous release failed. Fix the issue and use the SAME version number.** ## Release Workflow ### Step 1: Update Version in Cargo.toml (ONLY if previous release succeeded) Edit the version number: ```toml [package] version = "1.2.1" # bump as needed ``` ### Step 2: Commit and Tag ```bash git add -A git commit -m "release: v1.2.1" git tag 1.2.1 git push origin main git push origin 1.2.1 ``` **IMPORTANT: Push main FIRST, then the tag. The tag push triggers the release workflow.** ### Step 3: Monitor Build GitHub Actions will build TWO platforms: - `macos-latest` → `ccswitcher-macos-arm64` - `ubuntu-latest` → `ccswitcher-linux-x86_64` Check progress at: https://github.com/atom2ueki/cc-switcher/actions ## Failed Release - How to Fix and Retrigger ### Common Failure Reasons 1. **Binary path error**: Binary is at `target/<target>/release/ccswitcher`, not `target/release/ccswitcher` 2. **Missing cross-compiler**: Linux builds need `gcc-x86_64-linux-gnu` 3. **Workflow syntax errors** ### Fix and Retrigger (SAME version - don't bump!) ```bash # Fix the issue in the code # Edit the file that needs fixing # Commit with descriptive message (NOT "release: vX.X.X") git add -A git commit -m "fix: correct binary path for cross-compilation" # Push to main (this updates the code) git push origin main # Delete old tag from local and remote git tag -d 1.2.1 git push origin :refs/tags/1.2.1 # Recreate tag on the new commit git tag 1.2.1 git push origin 1.2.1 ``` **Key points:** - Use SAME version number (don't increment!) - Commit message should describe the FIX, not "release" - Delete and recreate tag to retrigger workflow - The workflow triggers on TAG PUSH, not commit push ## How Upgrade Works (Runtime) The `ccswitcher upgrade` command: 1. Fetches latest release from GitHub API 2. Compares with current binary's version (from Cargo.toml) 3. If newer, downloads new binary and replaces itself ## Installation for Users ```bash # Auto-detect platform curl -fsSL https://raw.githubusercontent.com/atom2ueki/cc-switcher/main/install.sh | bash # Manual platform selection curl -fsSL https://raw.githubusercontent.com/atom2ueki/cc-switcher/main/install.sh | bash -s -- -t macos-arm64 curl -fsSL https://raw.githubusercontent.com/atom2ueki/cc-switcher/main/install.sh | bash -s -- -t linux-x86_64 ``` ## Important Rules - Version in Cargo.toml MUST match the git tag - Use semantic versioning: X.Y.Z - NEVER bump version if previous release failed - Use SAME version number when fixing a failed release - CI builds for TWO platforms: macos-arm64 AND linux-x86_64 - The release is triggered by TAG push, not commit push
Ver no GitHub