This project provides a customizable GitHub Action to automate semantic versioning and changelog generation for Java projects using semantic-release and Maven.
- Automated semantic versioning based on commit messages (with gitmoji support)
- Changelog generation with custom Handlebars templates (default-template.hbs, commit-template.hbs)
- Maven version bump and build integration
- Supports both standard and prerelease workflows
- Customizable via
.releaserc.jsand.prerelease-releaserc.js
| Name | Description | Required | Default |
|---|---|---|---|
| github_token | GitHub token for authentication | Yes | |
| release_branch | Branch to perform the release from | No | master |
| maven_settings_path | Path to Maven settings.xml (if needed) | No |
| Name | Description |
|---|---|
| release_version | The version of the release created |
- Edit .releaserc.js for main releases.
- Edit .prerelease-releaserc.js for prereleases.
- Customize changelog templates in the templates/ directory.
Add the following step to your workflow YAML:
- name: Semantic Release
uses: your-org/semantic-release-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_branch: 'main' # or 'develop' for prereleases
maven_settings_path: './settings.xml' # optional