Polish the release process with extra checks.

To reduce risk and ensure a proper release, extra steps and a checklist have been added to the release process.

Resolves #1237.
This commit is contained in:
Greg L. Turnquist
2022-01-24 12:34:32 -06:00
parent 82b8fed457
commit f1502c7170

View File

@@ -29,24 +29,44 @@ You can also import the project into your IDE.
== Making a release
Before you make a release, follow this checklist:
* Are you using the latest milestone/release candidate/release of Spring Framework? If not, upgrade. (Don't forget `spring-buildsnapshot` profile.)
* Are you using the latest milestone/release candidate/release of Spring Security? If not, upgrade. (Don't forget `spring-buildsnapshot` profile.)
* Are you setup with the right version of Java? If not switch. (Java 17 for 4.0+, Java 8 for everything else.)
* Is it time to switch from milestone to release candidate? Or from release candidate to release?
NOTE: The _actual_ building and releasing is done on CI inside a Docker container, ensuring little risk between versions of Java.
But part of the release process requires a local check, which DOES depend upon your environment.
1. Create a new release (on the main branch).
+
----
% ci/create-release.sh <release version> <next snapshot version>
----
+
2. With the release tagged, push the tagged version to the release branch.
2. With the release tagged, update the release branch to the newly created tag.
+
----
% git checkout -b release-3.x
% git reset --hard <tag>
----
+
3. Verify this builds locally and passes all tests.
+
----
% ./mvnw clean package
% ./mvnw -Pspring-buildsnapshot clean package
----
+
4. Push the tagged version to the release branch.
+
----
% git push -f origin release-3.x
----
NOTE: You can chain the previous set of commands together using `&&`.
The pipeline will build and release the "release-3.x" branch. It will also build a new a new snapshot and stage it on artifactory.
For releases that go to Maven Central, the user much manually check out and verify the artifacts before releasing them.
The pipeline will build and release the "release-3.x" branch. It will also build a new snapshot and stage it on artifactory.
For releases that go to Maven Central, the user must manually check out and verify the artifacts before releasing them.
=== Running CI tasks locally