This document describes the secure release process for ftr. This process ensures that all releases are thoroughly tested and validated before artifacts are published.
The release process has been designed with the following security principles:
- No release can be created from untested code
- All releases must go through the full CI pipeline
- Release artifacts are only built from validated commits on the main branch
- The process is auditable through PR history
Before starting a release:
- Ensure all planned features and fixes are merged to main
- Update CHANGELOG.md with all changes for the release
- Ensure the version in Cargo.toml is updated
- Run
cargo testlocally to verify tests pass - Run
cargo clippy -- -D warningsto ensure no linting issues
# Create a release branch from main
git checkout main
git pull origin main
git checkout -b release-v0.x.y-
Update version in
Cargo.toml -
Update
CHANGELOG.md:- Move items from
[Unreleased]to a new version section - Add the release date
- Update the comparison links at the bottom
- Move items from
-
Commit the changes:
git add Cargo.toml CHANGELOG.md
git commit -m "Prepare for v0.x.y release"- Push the release branch:
git push -u origin release-v0.x.y-
Create a PR from
release-v0.x.ytomain -
Ensure all CI checks pass:
- Tests on all platforms (Linux, macOS, Windows, FreeBSD)
- Clippy and formatting checks
- Security audit
- Documentation builds
-
Get the PR reviewed and approved by maintainers
- Merge the PR to main
- Pull the latest main locally:
git checkout main
git pull origin main- Create and push the release tag:
git tag -a v0.x.y -m "Release v0.x.y
Brief description of major changes
See CHANGELOG.md for full details"
git push origin v0.x.yWhen you push the tag, the following automated processes will run:
-
Release Validation (
validate-release.yml):- Verifies the tag points to a commit on main
- Checks that Cargo.toml version matches the tag
- Runs the full CI suite again
- Validates that all checks pass
-
Artifact Building (only if validation passes):
- Debian packages built for amd64 and arm64
- Windows binaries built for x64 and ARM64
- Draft GitHub release created with artifacts
-
Monitor the Actions tab in GitHub to ensure all workflows succeed
-
Go to the GitHub Releases page
-
Find the draft release created by the workflow
-
Edit the release notes:
- Add a summary of key changes
- Include installation instructions
- Link to the full CHANGELOG
- Credit contributors
-
Publish the release (this triggers the crates.io publish)
After publishing:
- Check that the release appears on crates.io
- Test installation methods:
cargo install ftr- Debian package installation
- Windows binary execution
- Update any documentation that references the version
- Direct tag pushing: Tags must point to commits that exist on main
- Untested releases: Full CI must run and pass before artifacts are built
- Version mismatches: Tag version must match Cargo.toml version
- Bypassing PR process: Commits should go through PR review
Ensure these GitHub branch protection rules are configured for main:
- Require pull request reviews before merging
- Require status checks to pass before merging
- Require branches to be up to date before merging
- Include administrators in restrictions
- Require conversation resolution before merging
If the validation workflow fails:
- Check that the tag points to a commit on main
- Verify Cargo.toml version matches the tag
- Ensure the commit has passed CI (was part of a merged PR)
If CI fails when running on the release tag:
- Fix the issue on a new branch
- Create a PR to main
- After merging, delete the failed tag:
git push --delete origin v0.x.y - Start the release process again
If the crates.io publish fails:
- Check the error message in the GitHub Actions log
- Common issues:
- Version already exists on crates.io
- Missing or invalid API token
- Cargo.toml metadata issues
In case of critical security fixes:
- Follow the same process but use
hotfix-v0.x.yas the branch name - Ensure the fix is minimal and focused
- Fast-track the PR review with multiple maintainers
- Document the emergency release in CHANGELOG.md