Synthèse automatique
Automatise le cycle de publication d'un projet Rust (RTK) : vérifications qualité, choix du numéro de version, mise à jour de Cargo.toml, commit, tag Git annoté et push déclenchant la CI/CD.
Points forts
- Checklist pré-release explicite : cargo fmt --check, clippy sans avertissement, cargo test, tests d'intégration via cargo test --ignored
- Guide de versioning sémantique illustré par des exemples concrets propres au projet (nouveau filtre = MINOR, correctif = PATCH)
- Inclut des vérifications de performance mesurables avec hyperfine et /usr/bin/time (seuils <10 ms et <5 Mo)
- Couvre la chaîne complète jusqu'au tag Git annoté et au push des tags pour déclencher le workflow GitHub Actions
Limites
- Fortement couplé à RTK : chemins, noms de binaires et commandes (target/release/rtk) ne sont pas transposables tels quels
- Instructions contradictoires sur CHANGELOG.md : il est dit auto-généré par release-please, puis un modèle manuel est fourni
- La section de vérification post-release est tronquée et suppose que les outils externes (hyperfine, gh, cargo) sont déjà installés
À utiliser lorsqu'une version de RTK est prête à être publiée et qu'il faut enchaîner vérifications, bump de version, tag et push.
À éviter sur un projet non-Rust ou dont le processus de release ne repose pas sur Cargo, Git et GitHub Actions.
Analyse de sécurité
PrudenceThe skill automates a legitimate release workflow, but it includes powerful operations such as deleting remote tags, deleting GitHub releases, yanking crates.io versions, and downloading/executing binaries. These are scoped to release management and do not exfiltrate data or hide malicious payloads, but they could cause unintended damage if misused, warranting caution.
- •Contains commands that delete remote tags (git push origin :refs/tags/vX) and GitHub releases (gh release delete --yes) as part of rollback procedures.
- •Includes cargo yank to remove a published crate version from crates.io.
- •Uses curl to download a binary from GitHub releases and then executes it (chmod +x and ./rtk), though not piped to shell.
- •Pushes to remote and triggers CI/CD, which can affect production artifacts.
Exemples
Ship RTK v0.17.0 — we just added the new rtk pytest filter, so run the full release checklist, bump the minor version, tag it and push.Do a patch release for the git log filter bug fix: verify fmt/clippy/tests, bump to 0.16.1, create the annotated tag and push to origin.Run the pre-release checklist on RTK: cargo fmt --check, clippy, all tests, the ignored integration tests, and the hyperfine benchmark to confirm we're still under 10ms.description: Build, commit, push & version bump workflow - automates the complete release cycle allowed-tools: Read Write Edit Bash Grep Glob
Ship Release
Systematic release workflow for RTK: build verification, version bump, changelog update, git tag, and push to trigger CI/CD.
When to Use
- Manual invocation: When ready to release a new version
- After feature completion: Before tagging and publishing
- Before version bump: To automate the release checklist
Pre-Release Checklist (Auto-Verified)
Before running /ship, verify:
1. Quality Checks Pass
cargo fmt --all --check # Code formatted
cargo clippy --all-targets # Zero warnings
cargo test --all # All tests pass
2. Performance Benchmarks Pass
hyperfine 'target/release/rtk git status' --warmup 3
# Should show <10ms mean time
/usr/bin/time -l target/release/rtk git status
# Should show <5MB maximum resident set size
3. Integration Tests Pass
cargo install --path . --force # Install locally
cargo test --ignored # Run integration tests
4. Git Clean State
git status # Should show "nothing to commit, working tree clean"
Release Workflow
Step 1: Determine Version Bump
Semantic Versioning (MAJOR.MINOR.PATCH):
- MAJOR (v1.0.0): Breaking changes (rare for RTK)
- MINOR (v0.X.0): New features, new filters, new commands
- PATCH (v0.0.X): Bug fixes, performance improvements
Examples:
- New filter added (
rtk pytest) → MINOR bump (v0.16.0 → v0.17.0) - Bug fix in
git logfilter → PATCH bump (v0.16.0 → v0.16.1) - Breaking CLI arg change → MAJOR bump (v0.16.0 → v1.0.0)
Step 2: Update Version
Files to update:
Cargo.toml(line 3):version = "X.Y.Z"README.md(if version mentioned)
Note:
CHANGELOG.mdis auto-generated by release-please from conventional commit messages — do not edit manually.
Example:
# Cargo.toml (before)
[package]
name = "rtk"
version = "0.16.0" # Current version
# Cargo.toml (after - MINOR bump)
[package]
name = "rtk"
version = "0.17.0" # New version
CHANGELOG.md template:
## [0.17.0] - 2026-02-15
### Added
- `rtk pytest` command for Python test filtering (90% token reduction)
- Support for `pytest` JSON output parsing
- Integration with `uv` package manager auto-detection
### Fixed
- Shell escaping for PowerShell on Windows
- Memory leak in regex pattern caching
### Changed
- Updated `cargo test` filter to show test names in failures
Step 3: Build and Verify
# Clean build
cargo clean
cargo build --release
# Verify binary
target/release/rtk --version
# Should show new version
# Run full quality checks
cargo fmt --all --check
cargo clippy --all-targets
cargo test --all
# Benchmark performance
hyperfine 'target/release/rtk git status' --warmup 3
# Should still be <10ms
Step 4: Commit Version Bump
# Stage version files
git add Cargo.toml Cargo.lock README.md
# Commit with version tag
git commit -m "chore(release): bump version to v0.17.0
- Updated Cargo.toml version
- Verified all quality checks pass
- Benchmarked performance (<10ms startup)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>"
Step 5: Create Git Tag
# Create annotated tag with changelog excerpt
git tag -a v0.17.0 -m "Release v0.17.0
Added:
- rtk pytest command (90% token reduction)
- Support for uv package manager
Fixed:
- Shell escaping for PowerShell
- Memory leak in regex caching
Performance: <10ms startup, <5MB memory"
Step 6: Push to Remote
# Push commit and tags
git push origin main
git push origin v0.17.0
# Trigger GitHub Actions release workflow
# (CI/CD will build binaries, create GitHub release, publish to crates.io if configured)
Post-Release Verification
After pushing, verify:
1. GitHub Actions CI/CD Pass
# Check GitHub Actions workflow status
gh run list --limit 1
# Watch latest run
gh run watch
2. GitHub Release Created
# Check if release created
gh release view v0.17.0
# Should show:
# - Release notes from git tag
# - Binaries attached (macOS, Linux x86_64/ARM64, Windows)
# - Checksums for verification
3. Installation Verification
# Test installation from release
curl -sSL https://github.com/rtk-ai/rtk/releases/download/v0.17.0/rtk-macos-latest -o rtk
chmod +x rtk
./rtk --version
# Should show v0.17.0
Rollback Plan
If release has critical issues:
Option 1: Patch Release (Preferred)
# Fix issue in new branch
git checkout -b hotfix/v0.17.1
# Apply fix
cargo test --all
git commit -m "fix: critical issue in pytest filter"
# Release v0.17.1 (PATCH bump)
# Follow release workflow above
Option 2: Yank Release (crates.io only)
# Yank broken version from crates.io
cargo yank --vers 0.17.0
# Users can't download yanked version, but existing installs work
Option 3: Revert Tag (Last Resort)
# Delete tag locally
git tag -d v0.17.0
# Delete tag on remote
git push origin :refs/tags/v0.17.0
# Delete GitHub release
gh release delete v0.17.0 --yes
# Revert commit
git revert HEAD
git push origin main
Automated Release Script (Optional)
Save as scripts/ship.sh:
#!/bin/bash
set -euo pipefail
# Parse version argument
if [ $# -ne 1 ]; then
echo "Usage: $0 <version>"
echo "Example: $0 0.17.0"
exit 1
fi
NEW_VERSION=$1
echo "🚀 Starting release workflow for v$NEW_VERSION"
# 1. Quality checks
echo "📦 Running quality checks..."
cargo fmt --all --check
cargo clippy --all-targets
cargo test --all
# 2. Update version
echo "🔢 Updating version to $NEW_VERSION..."
sed -i '' "s/^version = .*/version = \"$NEW_VERSION\"/" Cargo.toml
# 3. Build
echo "🔨 Building release binary..."
cargo build --release
# 4. Verify version
echo "✅ Verifying version..."
target/release/rtk --version | grep "$NEW_VERSION"
# 5. Commit
echo "💾 Committing version bump..."
git add Cargo.toml Cargo.lock
git commit -m "chore(release): bump version to v$NEW_VERSION
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>"
# 6. Tag
echo "🏷️ Creating git tag..."
git tag -a "v$NEW_VERSION" -m "Release v$NEW_VERSION"
# 7. Push
echo "🚢 Pushing to remote..."
git push origin main
git push origin "v$NEW_VERSION"
echo "✅ Release v$NEW_VERSION shipped!"
echo "Monitor CI/CD: gh run watch"
Usage:
chmod +x scripts/ship.sh
./scripts/ship.sh 0.17.0
Release Frequency
Recommended cadence:
- PATCH releases: As needed for critical bugs (24h turnaround)
- MINOR releases: Weekly or bi-weekly for new features
- MAJOR releases: Quarterly or when breaking changes necessary
Version History Reference
Check version history:
git tag -l "v*" # List all version tags
git log --oneline --tags # Show commits with tags
Example output:
v0.17.0 (HEAD -> main, tag: v0.17.0, origin/main)
v0.16.0
v0.15.1
v0.15.0
Common Issues
Issue: CI/CD Fails After Tag Push
Symptom: GitHub Actions workflow fails on release build
Solution:
# Fix issue locally
git checkout main
# Apply fix
cargo test --all
git commit -m "fix: CI/CD build issue"
git push origin main
# Delete old tag
git tag -d v0.17.0
git push origin :refs/tags/v0.17.0
# Create new tag
git tag -a v0.17.0 -m "Release v0.17.0 (rebuild)"
git push origin v0.17.0
Issue: Version Mismatch
Symptom: rtk --version shows old version after bump
Solution:
# Cargo.lock might be out of sync
cargo update -p rtk
cargo build --release
# Verify
target/release/rtk --version
Issue: Changelog Merge Conflict
Symptom: CHANGELOG.md has conflicts after rebase
Solution: Do not edit CHANGELOG.md manually. It is auto-generated by release-please from conventional commit messages when merging to master.
Security Considerations
Before releasing:
- [ ] No secrets in code (API keys, tokens)
- [ ] No
.envfiles committed - [ ] Dependencies scanned (
cargo audit) - [ ] Shell injection vulnerabilities reviewed
- [ ] Cross-platform shell escaping tested
Dependency audit:
cargo install cargo-audit
cargo audit
# Example output:
# Crate: some-crate
# Version: 0.1.0
# Warning: vulnerability found
# Advisory: CVE-2024-XXXXX
If vulnerabilities found:
# Update vulnerable dependency
cargo update some-crate
# Verify fix
cargo audit
# Re-run quality checks
cargo test --all
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/automated-release-workflow-for-rtk-mte1lgcc/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/automated-release-workflow-for-rtk-mte1lgcc' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/automated-release-workflow-for-rtk-mte1lgcc/download' --output '.skill-downloads/automated-release-workflow-for-rtk-mte1lgcc/SKILL.md.part' && mv '.skill-downloads/automated-release-workflow-for-rtk-mte1lgcc/SKILL.md.part' '.skill-downloads/automated-release-workflow-for-rtk-mte1lgcc/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Outils déclarés par l’auteur (à vérifier dans votre agent) : Read Write Edit Bash Grep Glob
Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Le fichier ne fournit pas un en-tête name/description exploitable pour cette procédure native. Le téléchargement reste disponible pour lecture ; utilisez le mode manuel ci-dessous.
Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/automated-release-workflow-for-rtk-mte1lgcc/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Configurer un canal de discussion avec SecretRefs
DevOps
Configurez des canaux de discussion avec des commandes non interactives, les secrets étant uniquement des SecretRefs. Couvre les étapes de collecte, modification, réparation et vérification.
Enquêter sur les échecs CI de ClickHouse
DevOps
Investigue un échec CI de ClickHouse de bout en bout à partir d'une URL de PR ou de rapport S3. Récupère les tests échoués, classe flaky vs vraie régression, et cherche des issues/fixes existants.
Revue de PR Ansible
DevOps
Examine une PR Ansible selon le processus standardisé du projet, incluant la validation des changelogs, la couverture de tests et le suivi des commentaires.