This document describes the release process of SDA Dropwizard Commons.
The release process is automated.
It generates new releases for all merges to main
and uploads all releases to Maven Central.
New releases are created based on Semantic Versioning (see also CONTRIBUTING.md).
As soon as a Pull Request was merged, the following actions happen in order:
- It executes the Workflow to test the code (java-ci.yml).
- It executes the Workflow to determine if a new semantic version must be created (java-ci.yml).
- It creates a new release resulting in a new Git tag and a GitHub Release (java-ci.yml).
- The release creation triggers a Workflow for the upload (publish-release-maven-central.yml).
- Build and sign all artifacts (*.pom, *.jar, *-sources.jar, *-javadoc.jar).
- Create a new staging repository at https://oss.sonatype.org to allow parallel releases and increased stability.
- Publish the signed artifacts to the staging repository.
- Close the staging repository (using a Gradle Plugin).
- Release the staging repository (using a Gradle Plugin).
The release process can fail on different progress levels:
- During the
main
build due to flaky tests. - During the upload due to network issues.
- During the close or release of the staging repository due to network issues or other exceptions in the release plugin.
Basic rule: Check https://oss.sonatype.org before restarting a release workflow.
Don't do concurrent builds for multiple commits on the same release branches (
main
andrelease/1.x.x
are independent).
Action: It is safe to retry the build or to merge a new PR (all unreleased commits are included in the new release).
Everything that happens before creating a stating repository is safe to restart.
Action: Restart the workflow. Broken code is unlikely, but if present, prepare a PR to resolve the issue.
Action: Login to https://oss.sonatype.org, remove the staging repository and restart the workflow.
The upload succeeded but the release process couldn't be finished.
Action: Login to https://oss.sonatype.org, check if the contents of the repository look valid, close and release the repository manually. DO NOT restart the workflow; it is ok that it failed, as long as the release worked correctly.
Issues in the checks that sonatype executes are unlikely, but if present, discuss the issues and prepare a PR to resolve the issue.