- Update
CHANGELOG.md- change[Unreleased]to[X.Y.Z] - YYYY-MM-DDand add a new[Unreleased]section on top. - Update
versionproperty ingradle.propertiesto the new version. - Commit the changes from (1) and (2) with a message
"Release X.Y.Z"and push to GitHub. - Create an annotated git tag named
vX.Y.Zwith the message"Release X.Y.Z"and push it to GitHub. This will trigger the release workflow, which will build and publish the artifacts to Sonatype repository. You can use the./tools/tagreleasescript to ensure the tag is correctly formatted and prevent mistakes. - Update
versionproperty ingradle.propertiesto the next snapshot version, for example1.4.1-SNAPSHOT. - Commit the change from (5) with a message
"Update snapshot version"and push to GitHub. - If the release was made on a maintenance branch, make sure to
mergeorcherry-picktheCHANGELOG.mdentry to themainbranch as well.
- Keep Git tags with
vX.Y.Z-suffixformat. GitHub Actions job will only trigger on such tags and will removevprefix. - The releasing procedure only uploads the artifacts to Sonatype repository. You need to manually log in to Sonatype to push the artifacts to Maven Central.
See gradle-publish-release.yml for publishing release versions instructions.
Set the following environment variables in your CI/CD (GitHub Actions, etc.):
# generated on Sonatype account
PUBLISHING_USERNAME=<username>
PUBLISHING_PASSWORD=<password>
# generated PGP key for signing artifacts
SIGNING_KEY=<PGP key>
SIGNING_PASSWORD=<PGP password>Artifacts are published to Maven Central via Sonatype, using following Gradle task.
./gradlew -Pversion=<version> -Psign publishAllPublicationsToCentralPortalThis command uses nmcp Gradle plugin - link.