|
| 1 | +--- |
| 2 | +name: release-new-version |
| 3 | +description: Guide for releasing a new version of the deployer using the standard branch/tag workflow. Covers version bump, signed release commit, pushing main, creating signed tag, creating release branch, and verifying Docker + crate publication workflows. Use when asked to "release", "cut a version", "publish a new version", or "create release vX.Y.Z". |
| 4 | +metadata: |
| 5 | + author: torrust |
| 6 | + version: "1.0" |
| 7 | +--- |
| 8 | + |
| 9 | +# Release New Version |
| 10 | + |
| 11 | +This skill provides the canonical workflow to release a new version of the Torrust Tracker Deployer. |
| 12 | + |
| 13 | +Primary reference: [`docs/release-process.md`](../../../../../docs/release-process.md) |
| 14 | + |
| 15 | +## Release Order (Mandatory) |
| 16 | + |
| 17 | +Execute these steps in order: |
| 18 | + |
| 19 | +1. Update versions in manifests |
| 20 | +2. Create release commit |
| 21 | +3. Push release commit to `main` |
| 22 | +4. Create and push signed tag `vX.Y.Z` |
| 23 | +5. Create and push release branch `releases/vX.Y.Z` |
| 24 | +6. Verify release workflows |
| 25 | +7. Create GitHub release |
| 26 | + |
| 27 | +Do not reorder these steps. |
| 28 | + |
| 29 | +## Version and Naming Rules |
| 30 | + |
| 31 | +- Git tag: `vX.Y.Z` |
| 32 | +- Release branch: `releases/vX.Y.Z` |
| 33 | +- Docker release tag: `X.Y.Z` (no `v` prefix) |
| 34 | +- Crate version: `X.Y.Z` |
| 35 | + |
| 36 | +## Pre-Flight Checklist |
| 37 | + |
| 38 | +Before starting: |
| 39 | + |
| 40 | +- [ ] Clean working tree (`git status`) |
| 41 | +- [ ] Up to date with `origin/main` |
| 42 | +- [ ] GitHub environment `dockerhub-torrust` configured |
| 43 | +- [ ] GitHub environment `crates-io` configured with `CARGO_REGISTRY_TOKEN` |
| 44 | +- [ ] Releaser has permissions for `main`, tags, and release branches |
| 45 | + |
| 46 | +## Commands |
| 47 | + |
| 48 | +### 1) Update versions |
| 49 | + |
| 50 | +Update `version` in: |
| 51 | + |
| 52 | +- `Cargo.toml` |
| 53 | +- `packages/sdk/Cargo.toml` |
| 54 | + |
| 55 | +### 2) Commit and push |
| 56 | + |
| 57 | +```bash |
| 58 | +git add Cargo.toml packages/sdk/Cargo.toml |
| 59 | +git commit -S -m "release: version vX.Y.Z" |
| 60 | +git push origin main |
| 61 | +``` |
| 62 | + |
| 63 | +### 3) Tag and release branch |
| 64 | + |
| 65 | +```bash |
| 66 | +git tag -s -a vX.Y.Z -m "Release vX.Y.Z" |
| 67 | +git push origin vX.Y.Z |
| 68 | + |
| 69 | +git checkout -b releases/vX.Y.Z |
| 70 | +git push origin releases/vX.Y.Z |
| 71 | +``` |
| 72 | + |
| 73 | +### 4) Verify workflows |
| 74 | + |
| 75 | +- Container workflow: publishes Docker image from release branch |
| 76 | +- Publish Crate workflow: publishes `torrust-tracker-deployer-sdk` |
| 77 | + |
| 78 | +Workflow files: |
| 79 | + |
| 80 | +- `.github/workflows/container.yaml` |
| 81 | +- `.github/workflows/publish-crate.yaml` |
| 82 | + |
| 83 | +### 5) Create GitHub release |
| 84 | + |
| 85 | +Create the release manually from tag `vX.Y.Z` after both workflows pass. |
| 86 | + |
| 87 | +## Failure Handling |
| 88 | + |
| 89 | +- Docker failed, crate not started: fix Docker workflow and rerun on same release branch |
| 90 | +- Docker passed, crate failed before upload: fix issue and rerun crate workflow on same release branch |
| 91 | +- Crate already published: do not republish same version; cut a patch release |
| 92 | +- Ref already exists (tag/branch): stop and investigate partial release state before continuing |
| 93 | + |
| 94 | +## Quick Validation |
| 95 | + |
| 96 | +```bash |
| 97 | +# Verify refs exist remotely |
| 98 | +git ls-remote --tags origin vX.Y.Z |
| 99 | +git ls-remote --heads origin releases/vX.Y.Z |
| 100 | +``` |
| 101 | + |
| 102 | +For full operational guidance, troubleshooting, and rollback/yank policy, use [`docs/release-process.md`](../../../../../docs/release-process.md). |
0 commit comments