|
1 | | -Releasing |
2 | | -======== |
| 1 | +Please follow the steps in each one of the following sections to complete a release. |
3 | 2 |
|
| 3 | +## Merge the Release to Trigger Publishing to Maven Central |
4 | 4 | 1. Update the top level [gradle.properties](gradle.properties) to a non-SNAPSHOT version. |
5 | 5 | 2. Update [DbxSdkVersion.java](DbxSdkVersion.java) to a non-SNAPSHOT version. |
6 | 6 | 3. Update the [ChangeLog.md](ChangeLog.md) for the impending release. |
7 | 7 | 4. Update the [README.md](README.md) with the new version. |
8 | 8 | 5. `git commit -am "Prepare for release X.Y.Z"` (where X.Y.Z is the new version) |
9 | | - 6. `git tag -a vX.Y.Z -m "Version X.Y.Z"` (where X.Y.Z is the new version) |
10 | | - * Run `git tag` to verify it |
11 | | - 7. `git push --follow-tags` |
12 | | - * This should be pushed to your fork |
13 | | - 8. Create a PR with this commit and merge it. |
14 | | - 9. Update the top level [gradle.properties](gradle.properties) to the next `-SNAPSHOT` version. |
15 | | - 10. Update [DbxSdkVersion.java](DbxSdkVersion.java) to the next `-SNAPSHOT` version. |
16 | | - 11. `git commit -am "Prepare next development version"` |
17 | | - 12. Create a PR with this commit and merge it. |
18 | | - 13. This part below should be automated in CI, but if it fails, you will need to perform these steps manually |
19 | | - * Login to Sonatype to promote the artifacts https://central.sonatype.org/pages/releasing-the-deployment.html |
20 | | - * Click on Staging Repositories under Build Promotion |
21 | | - * Select all the Repositories that contain the content you want to release |
22 | | - * Click on Close and refresh until the Release button is active |
23 | | - * Click Release and submit |
24 | | - 14. Create a GitHub release with the title and tag vX.Y.Z. Attach the sdk, -javadoc, and -sources .jar files from your `build/libs` directory. |
25 | | - 15. Update gh-pages. Add or replace the files within `https://github.com/dropbox/dropbox-sdk-java/tree/gh-pages` with the files inside `dropbox-sdk-java/build/docs/javadoc`. Also update the root `index.html` to link to the new version documentation. This page will be shown here: https://dropbox.github.io/dropbox-sdk-java/ |
26 | | - 16. Push these changes to GitHub. |
| 9 | + 6. Create a PR titled "Release vX.Y.Z" |
| 10 | + 7. Merge the PR after checks pass. This will trigger our GitHub Action to publish to Maven Central. |
| 11 | + 8. This part below should be automated in CI, but if publishing fails, you will need to perform these steps manually |
| 12 | + * Login to Sonatype to promote the artifacts https://central.sonatype.org/pages/releasing-the-deployment.html |
| 13 | + * Click on Staging Repositories under Build Promotion |
| 14 | + * Select all the Repositories that contain the content you want to release |
| 15 | + * Click on Close and refresh until the Release button is active |
| 16 | + * Click Release and submit |
| 17 | + |
| 18 | +## Tag the Release |
| 19 | + 1. Pull the latest code `git fetch origin` that was just merged with the stable version. |
| 20 | + 2. Check out the commit that landed `git checkout COMMIT_HASH` |
| 21 | + 3. Tag the commit with `git tag -a vX.Y.Z -m "Version X.Y.Z"` (where X.Y.Z is the new version) |
| 22 | + 4. Push the tag `git push origin vX.Y.Z` |
| 23 | + |
| 24 | +## Preparing For Next Snapshot |
| 25 | + 1. Checkout the latest code from `main` into a new branch. |
| 26 | + 2. Update the top level [gradle.properties](gradle.properties) to the next `-SNAPSHOT` version. |
| 27 | + 3. Update [DbxSdkVersion.java](DbxSdkVersion.java) to the next `-SNAPSHOT` version. |
| 28 | + 4. `git commit -am "Prepare next development version"` |
| 29 | + 5. Create a PR with this commit and merge it. |
| 30 | + |
| 31 | +## Creating the Release on GitHub and Upload Artifacts |
| 32 | + 1. [Create a GitHub release](https://github.com/dropbox/dropbox-sdk-java/releases) with the title from the `vX.Y.Z` tag. Attach the sdk, -javadoc, and -sources .jar files that were [published to Maven Central](https://repo1.maven.org/maven2/com/dropbox/core/dropbox-core-sdk/). |
| 33 | + 2. Checkout the `gh-pages` branch. Add or replace the files within `https://github.com/dropbox/dropbox-sdk-java/tree/gh-pages` with the files inside the javadoc jar (You can unzip the javadoc jar after downloading from Maven Central). Also update the root `index.html` to link to the new version documentation. This page will be shown here: https://dropbox.github.io/dropbox-sdk-java/ |
| 34 | + 3. Push these changes to the `gh-pages` branch on GitHub. |
0 commit comments