feat(releaser): CHANGELOG auto-update, --init, and --changelog-file flags
ci / vet, staticcheck, test, build (push) Successful in 3m30s
release / Build and publish release (push) Successful in 4m39s

- Automatically write/update CHANGELOG.md on every release, grouped by
  Breaking Changes / Added / Fixed; file is created if missing and the
  new section is committed alongside pom.xml in the release commit
- Add --init flag: scaffolds a default .releaser.yml in the repo root
- Add --changelog-file flag: override the default CHANGELOG.md path
- Add CommitFiles() to gitutil so pom.xml and CHANGELOG.md are staged
  in a single commit
- Fix HTTPS push when no token is set: delegate to the git CLI so that
  system credential helpers, SSH agents, and netrc are honoured

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-07 11:18:27 +02:00
parent 6ffe282105
commit 5d0489dd71
8 changed files with 419 additions and 32 deletions
+12 -3
View File
@@ -1,6 +1,6 @@
# releaser
![release](https://img.shields.io/badge/release-v0.4.2-blue.svg)
![release](https://img.shields.io/badge/release-v1.1.0-blue.svg)
A CI-friendly release automation tool for GitFlow workflows using Conventional Commits.
@@ -38,16 +38,22 @@ release/1.2 branch
## Usage
```bash
# Scaffold a default .releaser.yml in the current repository
releaser --init
# Simulate next version (no side effects)
releaser --dry-run
# Full release: bump pom.xml, commit, tag, push, GitLab release
# Full release: update pom.xml + CHANGELOG.md, commit, tag, push, GitLab release
releaser
# Commit and tag locally — skip push and GitLab release
releaser --no-push
# Update pom.xml but stop before committing (review first)
# Push commit and tag but skip creating the GitLab release
releaser --no-release
# Update files but stop before committing (review first)
releaser --no-commit
# … then commit manually and re-run:
releaser --tag-only
@@ -55,6 +61,9 @@ releaser --tag-only
# Explicitly target a branch (useful in detached HEAD CI)
releaser --branch release/1.2
# Write changelog to a custom file
releaser --changelog-file CHANGES.md
# Target a specific pom.xml
releaser --pom path/to/pom.xml