-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
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)
- Bumps version based on commit types (
- 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: sqlcmd2. 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
- Add
.github/workflows/release-please.yml - Add
release-please-config.json(optional) - Update version file location if needed
- Add conventional commit linter (optional)
- Document release process in CONTRIBUTING.md
- Test with a few merged PRs
References
Metadata
Metadata
Assignees
Labels
No labels