Summary
Implement automated version management using Release Please to replace manual version file updates.
Current State
- Version is stored in a version file
- Manual updates required for each release
- CHANGELOG updates are manual
- Easy to forget version bumps or have inconsistent versioning
Proposed Solution
Use Release Please (Google's release automation tool) to:
- Analyze conventional commits merged to main
- Auto-create a Release PR that:
- Bumps version based on commit types (
feat: → minor, fix: → patch, feat!: → major)
- Updates CHANGELOG.md automatically
- Updates version file(s)
- When Release PR is merged → Creates GitHub Release with tag
Benefits
- Consistent semantic versioning based on commit messages
- Auto-generated CHANGELOG from PR titles/commits
- Review before release (PR-based, not auto-publish)
- Less manual work for maintainers
- Native Go support in Release Please
Implementation
1. Add workflow file
# .github/workflows/release-please.yml
name: Release Please
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
with:
release-type: go
package-name: sqlcmd
2. Add release-please config (optional)
{
"packages": {
".": {
"release-type": "go",
"package-name": "sqlcmd",
"changelog-path": "CHANGELOG.md",
"bump-minor-pre-major": true
}
}
}
3. Enforce conventional commits
Consider adding a PR title linter to ensure conventional commit format.
Conventional Commit Prefixes
| Prefix |
Version Bump |
Example |
feat: |
Minor (0.X.0) |
New feature |
fix: |
Patch (0.0.X) |
Bug fix |
feat!: or BREAKING CHANGE: |
Major (X.0.0) |
Breaking change |
docs:, chore:, ci:, deps: |
No bump |
Maintenance |
Tasks
References
Summary
Implement automated version management using Release Please to replace manual version file updates.
Current State
Proposed Solution
Use Release Please (Google's release automation tool) to:
feat:→ minor,fix:→ patch,feat!:→ major)Benefits
Implementation
1. Add workflow file
2. Add release-please config (optional)
{ "packages": { ".": { "release-type": "go", "package-name": "sqlcmd", "changelog-path": "CHANGELOG.md", "bump-minor-pre-major": true } } }3. Enforce conventional commits
Consider adding a PR title linter to ensure conventional commit format.
Conventional Commit Prefixes
feat:fix:feat!:orBREAKING CHANGE:docs:,chore:,ci:,deps:Tasks
.github/workflows/release-please.ymlrelease-please-config.json(optional)References