-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Release Checklist
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.
- Checkout the releases branch
> git checkout releases
> git pull
- Only for major an minor releases (not patch releases), merge main
> git checkout main
> git pull
> git checkout releases
> git merge main
- Update release date in
CHANGELOG.md
> vim CHANGELOG.md
> git add CHANGELOG.md
- 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
- Make a release commit. Replace version with the version string in version.txt.
> git add .
> git commit -m "Release 10.0.0"
- Tag the release. Replace version with the version string in version.txt.
> git tag v10.0.0
- 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.
- 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)
.
- Merge releases to main (only relevant for major/minor builds)
> git checkout main
> git merge releases
> # Fix merge conflicts in version.txt
- 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)
.
- 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:
- Login into Sonatype console, you can find the credentials in Realm's LastPass account.
- 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. - After ~5min the repos would be closed, select them all and click the
Release
menu option. - A confirmation prompt will show, select the automatically drop option and confirm.
- Done! After some time you would be able to search for them.
- Celebrate 🎉
- 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