Skip to content

Release Checklist

Claus Rørbech edited this page Apr 14, 2023 · 4 revisions

This document describes how to prepare a branch for release. Most of a release is done from CI, but a few manual steps still remain.

Steps for a minor/patch release

  1. Checkout the releases branch
    > git checkout releases
    > git pull
  1. Only for major an minor releases (not patch releases), merge main
    > git checkout main
    > git pull
    > git checkout releases
    > git merge main
  1. Update release date in CHANGELOG.md
    > vim CHANGELOG.md
    > git add CHANGELOG.md
  1. Update version.txt by removing the -SNAPSHOT suffix
    > cat version.txt  # Should output something like 10.0.0-SNAPSHOT
    > vim version.txt
    > git add version.txt
  1. Make a release commit. Replace version with the version string in version.txt.
    > git add .
    > git commit -m "Release 10.0.0"
  1. Tag the release. Replace version with the version string in version.txt.
    > git tag v10.0.0
  1. Push to Github. Replace version with the version string in version.txt.
   > git push --atomic origin releases v10.0.0

This will trigger the automated release process on CI. Once complete you will see a message being posted to #realm-releases and #realm-java-team-ci. The automated release will publish binaries on Bintray, upload debug symbols to S3 and upload javadoc to the MongoDB website.

  1. Prepare the releases branch for next version
    > vim version.txt
    > git add version.txt
    > vim CHANGELOG.md
    > git add CHANGELOG.md
    > git commit -m "Prepare next dev iteration"
    > git push origin releases

We release SNAPSHOT's directly from the releases branch, so we need to bump the patch version and append -SNAPSHOT. I.e. if the version released was 10.0.0, the new version should be 10.0.1-SNAPSHOT. Add a new changelog entry with the next version and date placeholder 10.0.1 (YYYY-MM-DD).

  1. Merge releases to main (only relevant for major/minor builds)
    > git checkout main
    > git merge releases
    > # Fix merge conflicts in version.txt
  1. Prepare next dev iteration on main
    > vim version.txt
    > git add version.txt
    > vim CHANGELOG.md
    > git add CHANGELOG.md
    > git commit -m "Prepare next dev iteration"
    > git push origin main

We release next minor versions from the master branch, so we need to bump the minor version and append -SNAPSHOT. I.e. if the version released was 10.0.0, the new version should be 10.1.0-SNAPSHOT. This is true even if we did a patch release. So if we released 10.0.3 from the releases branch, the version on master should still be 10.1.0. Add a new changelog entry with the next version and date placeholder 10.1.0 (YYYY-MM-DD).

  1. Manual release on Maven Central

The release on maven central is not fully automated yet on Realm-java. It requires some manual steps on the Sonatype console:

  1. Login into Sonatype console, you can find the credentials in Realm's LastPass account.
  2. There should be 4 stagging repositories in the console, select them all and click the Close menu option. It will take some time to process the action. Screenshot for close
  3. After ~5min the repos would be closed, select them all and click the Release menu option. Screenshot for release
  4. A confirmation prompt will show, select the automatically drop option and confirm. Screenshot for confirmation
  5. Done! After some time you would be able to search for them.
  1. Celebrate 🎉

Troubleshooting 🔨

  • In case you end up in a half-successful release (i.e the docs/tests passes but the S3 or maven upload fails) you can use this template PR to replay only necessary parts without creating a new Git tag https://github.com/realm/realm-java/pull/7704
Clone this wiki locally