|
| 1 | +# Releasing |
| 2 | + |
| 3 | +## Overview |
| 4 | +This guide explains how we publish development snapshots and releases for BigBone. The whole process is based on |
| 5 | +GitHub Actions and the Gradle build system. The process is split into two parts: publishing a new development snapshot |
| 6 | +and publishing a new release. This guide is mostly relevant for project maintainers. |
| 7 | + |
| 8 | +## Publish a New Snapshot |
| 9 | +Whenever you want to release a new development snapshot, please follow the steps listed below. Let's assume we're about |
| 10 | +to publish a development snapshot for the upcoming `2.0.0` version. The process is as follows: |
| 11 | + |
| 12 | +1. Agree within the team whether a new development snapshot should be published or not. |
| 13 | +2. Make sure that attribute `bigbone` in `/gradle/libs.version.toml` is set to `bigbone = "2.0.0-SNAPSHOT"`. If this is |
| 14 | + not the case, change it and commit the change to the `master` branch. Note down the commit hash of the latest commit |
| 15 | + in the master branch as we'll need it later. For this example, we simply assume it is `aaaaaaa`. |
| 16 | +3. Manually invoke the GitHub `Release` workflow on the master branch. The workflow does the following: |
| 17 | + * Builds, signs and publishes the most recent version of the `master` branch to the Maven Central Snapshot Repository. |
| 18 | + * Creates a new draft of a release notes page [here](https://github.com/andregasser/bigbone/releases). |
| 19 | +4. Once the workflow has successfully finished, the new development snapshot is published. Now do the following: |
| 20 | + * Verify, that the binaries have been successfully uploaded to the Maven Central Snapshot Repository by visiting |
| 21 | + the [Maven Central repository URL for BigBone snapshots]( https://s01.oss.sonatype.org/content/repositories/snapshots/social/bigbone/bigbone/). |
| 22 | + * Note down the Maven Central timestamp (let's assume it is `20230530.130705`) and use it together with the commit |
| 23 | + hash from above (which is `aaaaaaa`) to create a tag for the snapshot on our `master` branch using |
| 24 | + `git tag -a v2.0.0-20230530.130705 -m v2.0.0-20230530.130705 aaaaaaa`. Push the tag to the `master` branch using |
| 25 | + `git push origin v2.0.0-20230530.130705`. |
| 26 | + * Edit the release notes page that was created during the workflow run and bring it into good shape. Use one of the |
| 27 | + previously created release note documents as a basis to get a feeling on how it should look like. Once you are |
| 28 | + happy, ask other project members for a quick review. Make sure breaking changes are part of the release notes. |
| 29 | + After positive feedback, publish the release notes. |
| 30 | + |
| 31 | +## Publish a New Release |
| 32 | +Let's assume we want to publish a new release for version `2.0.0`. A new release for this version is published to Maven |
| 33 | +Central by performing the following steps in order: |
| 34 | + |
| 35 | +1. Agree within the team whether a new release version should be published or not. |
| 36 | +2. Make sure that attribute `bigbone` in `/gradle/libs.version.toml` is set to `bigbone = "2.0.0"`. If this is not the |
| 37 | + case, change it and commit the change to the `master` branch. Note down the commit hash of the latest commit |
| 38 | + in the master branch as we'll need it later. For this example, we simply assume it is `aaaaaaa`. |
| 39 | +3. Create a new tag for commit hash `aaaaaaa` using `git tag -a v2.0.0 -m v2.0.0 aaaaaaa` and push it to the `master` |
| 40 | + branch using `git push origin v2.0.0`. |
| 41 | +4. Since you've pushed a tag matching the pattern `vX.Y.Z`, the GitHub `Release` workflow is automatically executed. The |
| 42 | + workflow does the following: |
| 43 | + * Builds, signs and publishes tag `v2.0.0` to Maven Central. |
| 44 | + * Creates a new draft of a release notes page [here](https://github.com/andregasser/bigbone/releases). |
| 45 | +5. Once the workflow has successfully finished, please do the following: |
| 46 | + * Verify, that the binaries have been successfully uploaded to Maven Central by visiting the [Maven Central |
| 47 | + repository URL for BigBone releases](https://repo1.maven.org/maven2/social/bigbone). |
| 48 | + * Edit the release notes page that was created during the workflow run and bring it into good shape. Use one of the |
| 49 | + previously created release note documents as a basis to get a feeling on how it should look like. Once you are |
| 50 | + happy, ask other project members for a quick review. After positive feedback, publish the release notes. |
| 51 | +6. Agree within the team on the new development snapshot version (for simplicity, we assume `2.1.0`). Once that is sorted |
| 52 | + out, open `/gradle/libs.version.toml` and set the version to `bigbone = "2.1.0-SNAPSHOT"`. Commit this change to the |
| 53 | + `master` branch of the repository. The repository is now prepared to work on the `2.1.0` development snapshot. |
0 commit comments