This guide explains the recommended automated release workflow for the auto-release CLI.
This release workflow streamlines your release process by combining developer-led change tracking with CI-driven release generation. This approach offers several key benefits:
- Testing before production: Release candidates can be tested on staging before final deployment
- Automated changelogs: Change descriptions are automatically compiled into changelog
- Safety through PRs: All releases go through pull request review, preventing accidental deployments
- Audit trail: Every release is traceable through recorded change files and version history
// TODO
Throughout development, developers record changes as they are made:
# Record a feature change for a specific project
auto-release record-change --project myapp --type feature
# Record a bug fix
auto-release record-change --project myapp --type fix
# Record a breaking change
auto-release record-change --project myapp --type breakingThis command:
- Creates a change file in
.changes/<project>/ - Opens your default editor for a detailed description
- Generates a unique filename with timestamp
After recording, commit the change file alongside your code changes:
git add .changes/myapp/
git commit -m "feat: add new login feature"
git pushPush your changes to the main branch through your normal process.
Before pushing, you can use (locally or in CI)
auto-release checkto validate configuration and change files.
When changes are pushed to main, CI automatically generates a release PR:
auto-release generate-release-pr --filter myappThis command:
- Scans
.changes/for unreleased changes - Bumps project's version numbers based on change types
- Generates a changelog from recorded changes
- Creates a release branch (
release/<project>) - Opens a pull request for review
The release PR can trigger testing and staging deployment:
# Run your test suite
# Build the project
# Deploy to staging environmentThis step ensures the release candidate works correctly before production.
After staging tests pass, the team reviews and merges the release PR:
- Review the version changes and changelog
- Approve and merge to main
- Version changes now land on main
When the release PR is merged, CI creates tags and triggers production deployment:
auto-release tag-release-commitThis command:
- Compares HEAD with HEAD^1 to find the merge commit
- Creates git tags for each project (
<project>@<version>) - Creates releases on the platform (GitHub/GitLab)
- Tags trigger production deployment CI
The manual-release command is available for special scenarios:
auto-release manual-release --project myappUsecases:
- Local testing of release workflows
- Emergency hot fixes requiring immediate release
- Initial release setup
Important warnings:
- Not intended for CI use
- Bypasses the automated workflow safety checks
- Use only when the automated workflow is not suitable
Record changes as soon as you complete a feature or fix. Don't wait until release time, this ensures accurate changelogs and better documentation.
Keep descriptions clear and concise:
- Explain what changed and why
- Include relevant context for end users
- Mention breaking changes prominently
- Include migration strategies if needed
When reviewing release PRs:
- Verify the version bump is correct given your versioning strategy
- Read the generated changelog for clarity
- Ensure all expected changes are included
If changes are needed, you should not modify the release PR but submit code through your normal process.