diff --git a/.github/release.yml b/.github/release.yml index 7a8a287f..532bb22a 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -8,24 +8,50 @@ changelog: - dependabot - dependabot[bot] + # A pull request lands in the FIRST category whose labels it matches, so the + # order encodes priority: breaking-change outranks any other category label, + # and the "*" catch-all must stay last. categories: + - title: โš ๏ธ Breaking Changes + labels: + - breaking-change + + - title: ๐Ÿ”’ Security + labels: + - security + - title: ๐Ÿš€ Features labels: - enhancement - + - improvement + - title: ๐Ÿ› Bug Fixes labels: - bug - + - title: ๐Ÿ“š Documentation labels: - documentation - + + - title: โฌ†๏ธ Dependencies + labels: + - dependencies + - java + + - title: ๐Ÿงช Tests + labels: + - test + + - title: โš™๏ธ CI + labels: + - github-actions + - ci + - title: ๐Ÿ”ง Maintenance labels: - maintenance - refactor - + - title: Other Changes labels: - "*" diff --git a/RELEASE.md b/RELEASE.md index c7174c67..b0623105 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -32,6 +32,40 @@ No version input is required. The workflow derives the release version from the 11. Opens a **pull request** against `main` containing both the release version commit and the next-snapshot bump 12. Creates **draft** GitHub release (jars, sources, javadoc **and SBOMs** attached; requires manual publish) +## Release Notes + +The workflow generates the notes via `releases/generate-notes`, which classifies merged pull requests by label using [`.github/release.yml`](.github/release.yml). Each PR lands in the **first** matching section, so section order encodes priority and the `*` catch-all stays last: + +| Section | Labels | +|---|---| +| โš ๏ธ Breaking Changes | `breaking-change` | +| ๐Ÿ”’ Security | `security` | +| ๐Ÿš€ Features | `enhancement`, `improvement` | +| ๐Ÿ› Bug Fixes | `bug` | +| ๐Ÿ“š Documentation | `documentation` | +| โฌ†๏ธ Dependencies | `dependencies`, `java` | +| ๐Ÿงช Tests | `test` | +| โš™๏ธ CI | `github-actions`, `ci` | +| ๐Ÿ”ง Maintenance | `maintenance`, `refactor` | +| Other Changes | every other PR | + +Excluded from the notes: `ignore-for-release`, `pipeline`, and PRs authored by dependabot. + +`breaking-change` is an annotation on top of the category label, not a category of its own: add it to any PR that changes the public API and it sorts into Breaking Changes regardless of the other label. + +### Notes skeleton + +1. One-line intro + highlights โ€” hand-written in the draft, only for noteworthy releases +2. Generated "What's Changed" with the sections above +3. Maven Central coordinates block (from the `footer` in `release.yml`; `$RESOLVED_VERSION` is substituted by the workflow) +4. Full Changelog compare link (generated) + +### Labelling convention + +- Give every non-trivial PR exactly one category label before merging. +- Before publishing a draft release, review the notes: backfill labels on notable merged PRs and hand-move any mis-sorted lines โ€” the label is a default, not a contract. +- Use `ignore-for-release` for housekeeping-only PRs (version bumps, merge-only noise). + ## After Release 1. **Publish to Maven Central**: Go to the [Sonatype Central portal](https://central.sonatype.com/publishing/deployments), review the staged deployment, and **manually publish** it. Nothing is released to consumers until this step is performed. diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 7901c815..6c389ea6 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -401,6 +401,7 @@ mvn license:format - **Keep it focused**: One feature or fix per PR - **Include tests**: Add tests for new functionality - **Update docs**: Update README.md or other docs if needed +- **Add one category label**: `enhancement`, `bug`, `documentation`, `test`, `github-actions`, `dependencies`, `maintenance` or `refactor`, so the PR lands in the right release-notes section (see [Release Notes](../RELEASE.md#release-notes)); add `breaking-change` on top when the change breaks the public API, or `security`/`ignore-for-release` where they apply ### CI for pull requests from forks