Add workflow to release on Maven Central

This commit adds a standard GHA workflow to perform a release, including
syncing with Maven Central using s01.oss.sonatype.org.

The release workflow kicks off based on tag that matches `vX.Y.Z` and
perform the following:

* Build the project
* Stage the bits to repo.spring.io
* Move the staging bits to Maven Central
* Promote the bits to repo.spring.io/release
* Generate a changelog using the issues matching the version

Closes gh-1812
This commit is contained in:
Stéphane Nicoll
2024-10-10 15:39:26 +02:00
parent 4022e4a548
commit 9019074235
6 changed files with 217 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
name: Create GitHub Release
description: 'Create the release on GitHub with a changelog'
inputs:
milestone:
description: 'Name of the GitHub milestone for which a release will be created'
required: true
pre-release:
description: 'Whether the release is a pre-release (a milestone or release candidate)'
required: false
default: 'false'
token:
description: 'Token to use for authentication with GitHub'
required: true
runs:
using: composite
steps:
- name: Generate Changelog
uses: spring-io/github-changelog-generator@185319ad7eaa75b0e8e72e4b6db19c8b2cb8c4c1 #v0.0.11
with:
config-file: .github/actions/create-github-release/changelog-generator.yml
milestone: ${{ inputs.milestone }}
token: ${{ inputs.token }}
- name: Create GitHub Release
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.token }}
run: gh release create ${{ format('v{0}', inputs.milestone) }} --notes-file changelog.md ${{ inputs.pre-release == 'true' && '--prerelease' || '' }}

View File

@@ -0,0 +1,23 @@
changelog:
repository: spring-projects/spring-webflow
sections:
- title: ":star: New Features"
labels:
- "type: enhancement"
- title: ":lady_beetle: Bug Fixes"
labels:
- "type: bug"
- "type: regression"
- title: ":notebook_with_decorative_cover: Documentation"
labels:
- "type: documentation"
- title: ":hammer: Dependency Upgrades"
sort: "title"
labels:
- "type: dependency-upgrade"
contributors:
exclude:
names:
- "bclozel"
- "rstoyanchev"
- "snicoll"