|
| 1 | +# Release Process |
| 2 | + |
| 3 | +This document describes the automated release process for redisctl. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +The release process is fully automated using a combination of: |
| 8 | +- **release-plz**: Manages versions, changelogs, crates.io publishing, and git tags |
| 9 | +- **cargo-dist**: Builds platform binaries and creates GitHub releases |
| 10 | +- **Docker workflow**: Publishes Docker images |
| 11 | + |
| 12 | +## Release Flow |
| 13 | + |
| 14 | +``` |
| 15 | +1. Push commits to main |
| 16 | + ↓ |
| 17 | +2. release-plz workflow runs |
| 18 | + - Analyzes conventional commits |
| 19 | + - Creates PR with version bumps and changelog updates |
| 20 | + ↓ |
| 21 | +3. Review and merge PR |
| 22 | + ↓ |
| 23 | +4. release-plz publishes |
| 24 | + - Publishes redis-cloud to crates.io |
| 25 | + - Publishes redis-enterprise to crates.io |
| 26 | + - Publishes redisctl to crates.io |
| 27 | + - Creates git tag: redisctl-vX.Y.Z |
| 28 | + ↓ |
| 29 | +5. Tag triggers parallel workflows |
| 30 | + ├─ cargo-dist (release.yml) |
| 31 | + │ - Builds binaries for all platforms |
| 32 | + │ - Creates GitHub release with binaries |
| 33 | + │ - Updates Homebrew formula |
| 34 | + │ |
| 35 | + └─ Docker (docker.yml) |
| 36 | + - Builds multi-arch Docker images |
| 37 | + - Pushes to Docker Hub and GHCR |
| 38 | +``` |
| 39 | + |
| 40 | +## Conventional Commits |
| 41 | + |
| 42 | +Use conventional commit format for automatic versioning: |
| 43 | + |
| 44 | +- `feat: description` → Minor version bump (0.X.0) |
| 45 | +- `fix: description` → Patch version bump (0.0.X) |
| 46 | +- `feat!: description` or `BREAKING CHANGE:` → Major version bump (X.0.0) |
| 47 | +- `docs:`, `chore:`, `style:`, `refactor:`, `test:` → No version bump |
| 48 | + |
| 49 | +## Manual Intervention |
| 50 | + |
| 51 | +Normally, no manual intervention is needed. However, you can: |
| 52 | + |
| 53 | +### Skip Publishing for a Commit |
| 54 | +Add `[skip ci]` to commit message to skip all CI workflows. |
| 55 | + |
| 56 | +### Manual Tag Creation (Emergency) |
| 57 | +If you need to manually trigger a release: |
| 58 | + |
| 59 | +```bash |
| 60 | +git tag redisctl-v0.6.3 |
| 61 | +git push origin redisctl-v0.6.3 |
| 62 | +``` |
| 63 | + |
| 64 | +This will trigger cargo-dist and Docker workflows but NOT crates.io publishing. |
| 65 | + |
| 66 | +## Workspace Version Management |
| 67 | + |
| 68 | +All three crates (redis-cloud, redis-enterprise, redisctl) share the same version number in the workspace. When release-plz creates a version bump: |
| 69 | + |
| 70 | +1. It updates the version in all three crate Cargo.toml files |
| 71 | +2. It publishes all three crates to crates.io in dependency order |
| 72 | +3. It creates a single tag for the redisctl version |
| 73 | + |
| 74 | +## Troubleshooting |
| 75 | + |
| 76 | +### Release PR not created |
| 77 | +- Check that commits follow conventional commit format |
| 78 | +- Verify GITHUB_TOKEN has write permissions |
| 79 | +- Check release-plz workflow logs |
| 80 | + |
| 81 | +### Crates.io publish failed |
| 82 | +- Verify CARGO_REGISTRY_TOKEN is valid |
| 83 | +- Check that version doesn't already exist |
| 84 | +- Ensure all tests pass |
| 85 | + |
| 86 | +### Binary builds failed |
| 87 | +- Check cargo-dist workflow logs |
| 88 | +- Verify all platforms build successfully |
| 89 | +- Check for platform-specific dependencies |
| 90 | + |
| 91 | +### Docker build failed |
| 92 | +- Verify DOCKERHUB_USERNAME and DOCKERHUB_TOKEN secrets |
| 93 | +- Check Dockerfile for syntax errors |
| 94 | +- Ensure multi-arch build succeeds |
| 95 | + |
| 96 | +## Configuration Files |
| 97 | + |
| 98 | +- `release-plz.toml` - release-plz configuration |
| 99 | +- `.github/workflows/release-plz.yml` - Version PR and crates.io publishing |
| 100 | +- `.github/workflows/release.yml` - cargo-dist binary builds (autogenerated) |
| 101 | +- `.github/workflows/docker.yml` - Docker image publishing |
0 commit comments