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:

Project ID

logging-parent

Project version

7.8.0

You must adapt these values for your project! For instance, project ID needs to be replaced with log4j for Log4j, log4j-kotlin for Log4j Kotlin, etc.

Stage the release

  1. Create the release branch:

    git fetch -p
    git checkout -B release/7.8.0 origin/main
  2. Prepare sources for the release:

    1. Update the revision property in pom.xml

      If your project refers to its own version in the site sources, those need to be updated too. For instance, site-project.version needs to be updated for logging-parent.

    2. Release the changelog:

      ./mvnw -N -P changelog-release
    3. Edit the release notes (i.e., src/changelog/7.8.0/.release-notes.adoc.ftl)

  3. Commit & push your changes:

    git add .
    git commit -S -a -m 'Prepare to release `7.8.0`'
    git push -u origin release/7.8.0

    release/-prefixed branches trigger a particular GitHub Actions workflow and its run is idempotent. You can iterate on the release/7.8.0 branch to perfect it.

  4. Verify that the associated GitHub Actions workflow succeeds:

    1. The project.build.outputTimestamp property in pom.xml is updated

    2. Signed artifacts are uploaded to the Staging Repositories in repository.apache.org

    3. 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.)

    4. The release staging website is deployed using the freshly populated release/7.8.0-site-stg-out branch

    If not, commit the necessary fixes, push, and repeat.

Verify the release

Once the release is staged, the Release Manager should:

  1. Follow the Project release review instructions to verify the integrity of the release.

  2. 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 to dist/release/logging/logging-parent/7.8.0. Don’t use {{PROJECT_KEY}}: it differs from the project ID (e.g., the key of Log4j is logging-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.x and 2.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.

  1. Download the staged distribution from dist/dev:

    svn co https://dist.apache.org/repos/dist/dev/logging/logging-parent/7.8.0
  2. Log into ATR and create a new release:

    1. Enter the release commit ID, which you can find in the *-email-vote.txt file

    2. Upload only the distribution files (apache-logging-parent-7.8.0-{bin,src}.zip{,.asc,.sha512}). Do not upload the *-email-vote.txt and *-email-announce.txt files: ATR publishes every file of the candidate to dist/release.

  3. 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.

  4. Start the vote in ATR:

    1. Use the body of apache-logging-parent-7.8.0-email-vote.txt as the vote email.

    2. Select Automatically publish to SVN distribution area when this vote resolves.

  5. 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

  1. Pull the most recent changes and tags

    git fetch -p
  2. Tag the release (e.g., rel/7.8.0) and push it

    KEY_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.0
    1 Use the ID of an OpenPGP key that is registered in ATR and listed in the KEYS file. The -c options override any SSH or X.509 signing configured in your git settings.
    2 You can find the COMMIT-ID in 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

  1. Merge the rel/7.8.0 tag (not the release/7.8.0 branch!) to main

    git 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
  2. Set the revision property to the next development version (e.g., 7.9.0-SNAPSHOT) in pom.xml

  3. Commit changes and push the main branch

  4. Delete the local and remote copies of the release/7.8.0 branch

    git 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., 2.25.x for Log4j), do not merge the rel/7.8.0 tag to main-site-pro: the website must keep documenting the latest release line. Instead, copy the release notes (i.e., the src/changelog/7.8.0 folder) to the website of the latest release line, and update its download and lifecycle pages to the new LTS version.

  1. Merge the rel/7.8.0 tag (not the release/7.8.0 branch!) to main-site-pro and push it

    git 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-pro
    If there is no main-site-pro branch yet

    Create it from the rel/7.8.0 tag:

    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
  2. Verify that the deploy-site workflow successfully runs the deploy-site-pro job

  3. Verify that the project website is updated

  4. Delete the release staging website branch:

    git push --delete origin release/7.8.0-site-stg-out

Publish to Maven Central

  1. Release the staging repository in repository.apache.org

Create the GitHub release

  1. Create a new release in GitHub:

    • Use the rel/7.8.0 tag

    • Copy release notes from the generated emails

  2. Close the associated milestone

Announce the release (ATR)

  1. 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.

  2. Announce the release from its ATR finish page, using the body of apache-logging-parent-7.8.0-email-announce.txt as 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.

  3. 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.