-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Release process for v5
- Part 1: Pre release tasks
- Part 2: Release to Artifactory
- Part 2.1: Stage the release on Artifactory
- Part 2.2: Promote the release to Artifactory
- Part 3: Release to Maven Central
- Part 3.1: Stage the release on Sonatype
- Part 3.2: Promote the release to Maven Central
- Part 4: Post release tasks
- Part 4.1: Create git tag
- Part 4.2: Update documentation
- Part 4.3: Announce the release
- Part 5: Rolling back a release
- Get the latest changes from the upstream repository of the branch being released.
- Check if
pom.xml
refers to any snapshot/milestone dependencies. Later in the release process, the enforcer plugin will check for snapshots, but not for milestones. So it is better to do the verification at this point.
- Go to Github Actions: https://github.com/spring-projects/spring-batch/actions.
- Run the "Artifactory Staging" workflow by providing the version to release. This will deploy the release to https://repo.spring.io/libs-staging-local/org/springframework/batch
- Check uploaded jars in http://repo.spring.io/libs-staging-local/org/springframework/batch and do a smoke test with the staged version (check the integrity of the artifacts to see if jars are not corrupted or empty, etc).
- TODO: check if there is a Github Action that promotes artifacts from
libs-staging-local
tolibs-milestone-local
(for milestones) andlibs-release-local
(for releases), otherwise develop one or use a shell script for that. - Check uploaded jars in http://repo.spring.io/libs-milestone-local/ or http://repo.spring.io/libs-release-local/
Note: The process ends here for milestone releases
- Go to Github Actions: https://github.com/spring-projects/spring-batch/actions.
- Run the "Sonatype Staging" workflow by providing the version to release. This will download the artifacts from the Artifactory staging repository, GPG sign them and upload them to a fresh Sonatype staging repository. The Sonatype's repository ID will be printed at the end of the workflow by the "Print staging repository Id" step. This staging repository Id is needed for the next step.
- Go to https://s01.oss.sonatype.org/ and login with
springsource
account. - In the
Staging Repositories
tab, select the staging repository with the ID from previous step and check its content/activity:
If everything looks good, the staging repository can be closed and released from the UI. Otherwise, it should be dropped.
NB: If an extra check should be done from this staging repository, then the repository should be closed to be able to import jars from it and test them. Otherwise the content will not be visible.
None of the previous Github Actions changes the version in the code and pushes the changes to the upstream repository. The version change is done manually on purpose. At this point, the release should have been staged, tested and promoted to Artifactory and Maven Central. It is now safe to change the version in the code and push it to the upstream repository. From the root directory of the project, run the following commands (change the version number accordingly, no need to create a variable, substitute it, etc):
$./mvnw versions:set -DgenerateBackupPoms=false -DnewVersion=5.0.1
$git commit -m "Release version 5.0.1"
$git tag -a v5.0.1 -m "Release version 5.0.1"
$git push upstream v5.0.1
NB: The "v" prefix in the tag name is important, see https://github.com/spring-projects/spring-batch/issues/4183.
- TODO Add Github Action to upload the docs to the docs server
- Update the
current
andcurrent-SNAPSHOT
symbolic links on the docs server.
- Generate the release notes and create a release on Github.
- Update the project's page on Sagan with the latest release/snapshot versions.
- Write a release announcement blog post.
- Tweet about the release using the
@SpringBatch
handle. - Post a message in the
#spring-release
slack channel.
If anything goes wrong before promoting to Maven Central:
- Delete the version from Artifactory.
- Delete the release tag from git locally and remotely.
- Revert the version in
pom.xml
and push the change to the upstream repository. - Restart the release process.