This document describes how to create a new release of cage.
- You must have push access to the repository
- You must be able to push tags to GitHub
Edit Cargo.toml and update the version number:
[package]
name = "cage"
version = "0.5.0" # Update this lineAdd a new section for the version you're releasing. The format should be:
## 0.5.0 - YYYY-MM-DD
### Added
- New features go here
### Changed
- Changes to existing functionality
### Fixed
- Bug fixesMake sure to:
- Move items from the
## Unreleasedsection to your new version section - Use today's date in YYYY-MM-DD format
- Follow semantic versioning principles
git add Cargo.toml CHANGELOG.md
git commit -m "Bump version to 0.5.0"
git push origin masterThe tag MUST match the version in Cargo.toml with a v prefix:
# For version 0.5.0 in Cargo.toml, create tag v0.5.0
git tag v0.5.0
git push origin v0.5.0CRITICAL: The tag version (without the v prefix) must exactly match the version in Cargo.toml. If they don't match, the GitHub Actions workflow will fail.
Once you push the tag, GitHub Actions will automatically:
- Validate that the tag version matches Cargo.toml
- Build binaries for all platforms:
- Linux (x86_64, statically linked with musl)
- macOS Intel (x86_64)
- macOS Apple Silicon (aarch64)
- Windows (x86_64)
- Create a GitHub release with all binaries attached
- Extract the changelog section for this version and add it to the release notes
You can monitor the progress at: https://github.com/faradayio/cage/actions
The build typically takes 5-10 minutes.
Once the workflow completes:
- Go to https://github.com/faradayio/cage/releases
- Verify the new release appears with the correct version
- Check that all 4 binary archives are attached:
cage-v0.5.0-linux-x86_64.zipcage-v0.5.0-macos-x86_64.zipcage-v0.5.0-macos-aarch64.zipcage-v0.5.0-windows-x86_64.zip
- Verify the changelog appears in the release description
- Optionally, download and test a binary to ensure it works
Error: "Tag version (X.X.X) does not match Cargo.toml version (Y.Y.Y)"
Fix:
- Delete the tag locally:
git tag -d vX.X.X - Delete the tag remotely:
git push origin :refs/tags/vX.X.X - Fix the version in
Cargo.tomlto match your intended version - Commit and push the fix
- Create the correct tag and push it again
Fix:
- Check the Actions tab for the specific error
- If it's a build error, fix the code issue
- Delete the tag (see above)
- Increment the version number (e.g., 0.5.0 → 0.5.1)
- Update both
Cargo.tomlandCHANGELOG.md - Commit, push, and create a new tag
If you need to add or replace binaries:
- Go to the release page on GitHub
- Click "Edit release"
- You can upload new files or delete existing ones
- Click "Update release"
Fix:
- Delete the tag locally:
git tag -d vX.X.X - Delete the tag remotely:
git push origin :refs/tags/vX.X.X - Check out the correct commit:
git checkout <correct-commit-sha> - Create the tag:
git tag vX.X.X - Push the tag:
git push origin vX.X.X
Note: If the automated release was already created, you'll need to delete it from GitHub's releases page first.
We follow Semantic Versioning:
- MAJOR version (X.0.0): Incompatible API changes
- MINOR version (0.X.0): New functionality in a backward compatible manner
- PATCH version (0.0.X): Backward compatible bug fixes
The automated workflow does NOT publish to crates.io. To publish to crates.io:
cargo publishYou'll need appropriate credentials configured for crates.io.