Project release instructions
This section explains how to publish a new release of projects extending from the logging-parent POM and using its reusable CI workflows.
|
Shared instructions hardcode the following constants:
You must adapt these values for your project!
For instance, project ID needs to be replaced with |
Stage the release
-
Create the release branch:
git fetch -p git checkout -B release/7.8.0 origin/main -
Prepare sources for the release:
-
Update the
revisionproperty inpom.xmlIf your project refers to its own version in the site sources, those need to be updated too. For instance,
site-project.versionneeds to be updated forlogging-parent. -
Release the changelog:
./mvnw -N -P changelog-release -
Edit the release notes (i.e.,
src/changelog/7.8.0/.release-notes.adoc.ftl)
-
-
Commit & push your changes:
git add . git commit -S -a -m 'Prepare to release `7.8.0`' git push -u origin release/7.8.0release/-prefixed branches trigger a particular GitHub Actions workflow and its run is idempotent. You can iterate on therelease/7.8.0branch to perfect it. -
Verify that the associated GitHub Actions workflow succeeds:
-
The
project.build.outputTimestampproperty inpom.xmlis updated -
Signed artifacts are uploaded to the Staging Repositories in repository.apache.org
-
Signed distribution and its checksum (e.g.,
apache-logging-parent-7.8.0-{bin,src}.{zip,.zip.asc,.zip.sha512}) are uploaded to dist.apache.org/repos/dist/dev/logging/logging-parent/7.8.0 Subversion repository (along with auxiliary files; website, email texts, etc.) -
The release staging website is deployed using the freshly populated
release/7.8.0-site-stg-outbranch
If not, commit the necessary fixes, push, and repeat.
-
Verify the release
Once the release is staged, the Release Manager should:
-
Follow the Project release review instructions to verify the integrity of the release.
-
Some projects have additional integration tests that need to run on the release candidate artifacts:
logging-log4j2-
Run the integration-test.yaml workflow using the appropriate version number and URL of the Staging Repository as parameters.
Vote the release (ATR)
|
We are currently experimenting with releasing projects through Apache Trusted Releases (ATR). See its documentation, in particular Moving to ATR. |
One-time ATR project settings
Before the first release of a project through ATR, check the following settings on its ATR project page:
- Default publish location (Release settings, Finish tab)
-
Set it to
logging-parent/{{VERSION}}, so that the release is published todist/release/logging/logging-parent/7.8.0. Don’t use{{PROJECT_KEY}}: it differs from the project ID (e.g., the key of Log4j islogging-log4j). ATR does not follow files that are moved after publication, so this must be set before the first release. - Cycle match (Project, Version scheme)
-
If the project maintains more than one release line (e.g., Log4j
2.25.xand2.26.x), set a cycle match such as(\d+\.\d+)\..*. Only then enable Allow auto-archive on the Finish tab, otherwise a release of one line can archive the latest release of another line. - Third-party distribution (Release settings)
-
List the Maven Central artifacts of the project, so that ATR can check that they are published. ATR does not announce a release until it finds them on Maven Central, or you mark them as ignored.
-
Download the staged distribution from
dist/dev:svn co https://dist.apache.org/repos/dist/dev/logging/logging-parent/7.8.0 -
Log into ATR and create a new release:
-
Enter the release commit ID, which you can find in the
*-email-vote.txtfile -
Upload only the distribution files (
apache-logging-parent-7.8.0-{bin,src}.zip{,.asc,.sha512}). Do not upload the*-email-vote.txtand*-email-announce.txtfiles: ATR publishes every file of the candidate todist/release.
-
-
Look at the results of the ATR checks, but treat them as advisory only. Failed checks usually reflect limitations of ATR, or differences between the release model ATR assumes and ours. They do not mean that our release is wrong: our release process has been verified for much longer than ATR has existed. Since ATR is in beta, no check is a blocker, and we should be able to release through ATR without changing our release process.
-
Start the vote in ATR:
-
Use the body of
apache-logging-parent-7.8.0-email-vote.txtas the vote email. -
Select Automatically publish to SVN distribution area when this vote resolves.
-
-
Once the voting period is over and enough votes have been cast, resolve the vote in ATR. ATR tallies the votes from the thread: check its tally against the thread before resolving.
Publish the release
Tag the release
-
Pull the most recent changes and tags
git fetch -p -
Tag the release (e.g.,
rel/7.8.0) and push itKEY_ID=<KEY-ID> (1) COMMIT_ID=<COMMIT-ID> (2) git -c gpg.format=openpgp -c user.signingKey="$KEY_ID" \ tag -s rel/7.8.0 "$COMMIT_ID" -m 7.8.0 git push origin rel/7.8.01 Use the ID of an OpenPGP key that is registered in ATR and listed in the KEYSfile. The-coptions override any SSH or X.509 signing configured in your git settings.2 You can find the COMMIT-IDin the generated vote email.The ASF infrastructure treats
rel/-prefixed git tags special and ensures they are immutable for provenance reasons.
Merge the release into main
-
Merge the
rel/7.8.0tag (not therelease/7.8.0branch!) tomaingit checkout main git rebase origin/main # Sync with the remote repository git merge rel/7.8.0 # Pull changes up to the newly created tag -
Set the revision property to the next development version (e.g.,
7.9.0-SNAPSHOT) inpom.xml -
Commit changes and push the
mainbranch -
Delete the local and remote copies of the
release/7.8.0branchgit branch -D release/7.8.0 git push --delete origin release/7.8.0
Publish the website
|
If you are publishing a long-term support (LTS) release, that is, a release of an older line of the same major version (e.g., |
-
Merge the
rel/7.8.0tag (not therelease/7.8.0branch!) tomain-site-proand push itgit checkout main-site-pro git rebase origin/main-site-pro # Sync with the remote repository git merge rel/7.8.0 # Pull changes up to the newly created tag git push origin main-site-proIf there is no
main-site-probranch yetCreate it from the
rel/7.8.0tag:git checkout -B main-site-pro rel/7.8.0 echo "# $RANDOM" >>.asf.yaml git commit -S .asf.yaml -m 'Dummy `.asf.yaml` change to trigger the CI' git push -u origin main-site-pro -
Verify that the
deploy-siteworkflow successfully runs thedeploy-site-projob -
Verify that the project website is updated
-
Delete the release staging website branch:
git push --delete origin release/7.8.0-site-stg-out
Publish to Maven Central
-
Release the staging repository in repository.apache.org
Create the GitHub release
-
Create a new release in GitHub:
-
Use the
rel/7.8.0tag -
Copy release notes from the generated emails
-
-
Close the associated milestone
Announce the release (ATR)
-
On the ATR finish page, check that:
-
the download page links to the new release,
-
the artifacts are published in the distribution area,
-
the artifacts are published to Maven Central.
-
-
Announce the release from its ATR finish page, using the body of
apache-logging-parent-7.8.0-email-announce.txtas the announcement.ATR sends the announcement only after the files have reached the download servers. Until then, you can use Announce when ready to queue it, except for expedited security releases.
-
Archive the previous release of the same release line:
-
if auto-archive is configured (see Vote the release (ATR)), keep Auto archive prior release selected in the announcement form and check the version it shows,
-
otherwise, archive the previous release from its ATR release page.
-