|
| 1 | +# Release Process for redisctl |
| 2 | + |
| 3 | +This document outlines the complete release process to ensure all components are published correctly. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +A complete release includes: |
| 8 | +1. **GitHub Release** with binaries (handled by cargo-dist) |
| 9 | +2. **Docker Hub** image publication |
| 10 | +3. **crates.io** package publication |
| 11 | + |
| 12 | +## Release Steps |
| 13 | + |
| 14 | +### 1. Prepare the Release |
| 15 | + |
| 16 | +```bash |
| 17 | +# Ensure you're on main and up to date |
| 18 | +git checkout main |
| 19 | +git pull origin main |
| 20 | + |
| 21 | +# Update version in Cargo.toml files |
| 22 | +# Edit these files to update version (e.g., 0.6.1 -> 0.6.2): |
| 23 | +# - Cargo.toml (workspace.package.version) |
| 24 | +# - crates/redis-cloud/Cargo.toml |
| 25 | +# - crates/redis-enterprise/Cargo.toml |
| 26 | +# - crates/redisctl/Cargo.toml |
| 27 | +# Also update the dependency versions in crates/redisctl/Cargo.toml |
| 28 | + |
| 29 | +# Update CHANGELOG.md with release notes |
| 30 | + |
| 31 | +# Commit the changes |
| 32 | +git add -A |
| 33 | +git commit -m "chore: release vX.Y.Z" |
| 34 | + |
| 35 | +# Create a PR and merge it |
| 36 | +``` |
| 37 | + |
| 38 | +### 2. Create and Push the Release Tag |
| 39 | + |
| 40 | +**IMPORTANT**: Use the `v` prefix format (not `redisctl-v`) for consistency: |
| 41 | + |
| 42 | +```bash |
| 43 | +# After PR is merged, pull latest main |
| 44 | +git checkout main |
| 45 | +git pull origin main |
| 46 | + |
| 47 | +# Create the release tag |
| 48 | +git tag -a vX.Y.Z -m "Release vX.Y.Z" |
| 49 | + |
| 50 | +# Push the tag - this triggers all workflows |
| 51 | +git push origin vX.Y.Z |
| 52 | +``` |
| 53 | + |
| 54 | +### 3. Verify All Workflows Triggered |
| 55 | + |
| 56 | +The tag push should automatically trigger: |
| 57 | + |
| 58 | +1. **Release workflow** (cargo-dist): https://github.com/joshrotenberg/redisctl/actions/workflows/release.yml |
| 59 | + - Creates GitHub release with binaries |
| 60 | + - Takes ~10-15 minutes |
| 61 | + |
| 62 | +2. **Docker Build**: https://github.com/joshrotenberg/redisctl/actions/workflows/docker.yml |
| 63 | + - Publishes to Docker Hub |
| 64 | + - Takes ~5-10 minutes |
| 65 | + |
| 66 | +3. **Publish to crates.io**: https://github.com/joshrotenberg/redisctl/actions/workflows/publish-crates.yml |
| 67 | + - Publishes all three crates |
| 68 | + - Takes ~2-5 minutes |
| 69 | + |
| 70 | +### 4. Verify Release Components |
| 71 | + |
| 72 | +After workflows complete, verify: |
| 73 | + |
| 74 | +- [ ] GitHub Release: https://github.com/joshrotenberg/redisctl/releases |
| 75 | + - Should have binaries for all platforms |
| 76 | +- [ ] Docker Hub: https://hub.docker.com/r/joshrotenberg/redisctl/tags |
| 77 | + - Should have new version tag |
| 78 | +- [ ] crates.io: https://crates.io/crates/redisctl |
| 79 | + - Should show new version |
| 80 | + |
| 81 | +## Troubleshooting |
| 82 | + |
| 83 | +### If Docker or crates.io workflows don't trigger: |
| 84 | + |
| 85 | +The workflows now support both `v*` and `redisctl-v*` tag formats. If they still don't trigger: |
| 86 | + |
| 87 | +1. **Manual trigger via GitHub UI**: |
| 88 | + - Go to Actions tab |
| 89 | + - Select the workflow (Docker Build or Publish to crates.io) |
| 90 | + - Click "Run workflow" |
| 91 | + - Select the tag or branch |
| 92 | + |
| 93 | +2. **Manual trigger via CLI**: |
| 94 | + ```bash |
| 95 | + gh workflow run "Docker Build" --ref vX.Y.Z |
| 96 | + gh workflow run "Publish to crates.io" --ref vX.Y.Z |
| 97 | + ``` |
| 98 | + |
| 99 | +### If crates.io publish fails: |
| 100 | + |
| 101 | +Publish manually in order: |
| 102 | +```bash |
| 103 | +cd crates/redis-cloud && cargo publish |
| 104 | +cd ../redis-enterprise && cargo publish |
| 105 | +cd ../redisctl && cargo publish |
| 106 | +``` |
| 107 | + |
| 108 | +## Tag Format Standards |
| 109 | + |
| 110 | +Going forward, use the simpler `v` prefix format: |
| 111 | +- ✅ `v0.6.2` |
| 112 | +- ❌ `redisctl-v0.6.2` (avoid this) |
| 113 | + |
| 114 | +The workflows have been updated to support both formats for backward compatibility, but `v*` is preferred. |
| 115 | + |
| 116 | +## Automation Opportunities |
| 117 | + |
| 118 | +Consider adding: |
| 119 | +1. **release-plz** for automated version bumping and changelog generation |
| 120 | +2. **Unified release workflow** that ensures all three components are published |
| 121 | +3. **Release checklist GitHub Action** that validates all components were published |
0 commit comments