|
1 | | -Releasing |
2 | | -========= |
| 1 | +# Releasing |
3 | 2 |
|
4 | | - 1. Change the version in `gradle.properties` to a non-SNAPSHOT verson. |
5 | | - 2. Update the `CHANGELOG.md` for the impending release. |
6 | | - 3. Update the `README.md` with the new version. |
7 | | - 4. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version) |
8 | | - 5. `./gradlew clean publish --no-parallel`. |
9 | | - 6. Visit [Sonatype Nexus](https://oss.sonatype.org/) and promote the artifact. |
10 | | - 7. `git tag -a X.Y.Z -m "Version X.Y.Z"` (where X.Y.Z is the new version) |
11 | | - 8. Update the `gradle.properties` to the next SNAPSHOT version. |
12 | | - 9. `git commit -am "Prepare next development version."` |
13 | | - 10. `git push && git push --tags` |
14 | | - 11. Update the sample app to the release version and send a PR. |
| 3 | +1. Update the `VERSION_NAME` in `gradle.properties` to the release version. |
15 | 4 |
|
16 | | -If step 6 or 7 fails, drop the Sonatype repo, fix the problem, commit, and start again at step 5. |
| 5 | +2. Update the `CHANGELOG.md`: |
| 6 | + 1. Change the `Unreleased` header to the release version. |
| 7 | + 2. Add a link URL to ensure the header link works. |
| 8 | + 3. Add a new `Unreleased` section to the top. |
17 | 9 |
|
| 10 | +3. Commit |
18 | 11 |
|
19 | | -Prerequisites |
20 | | -------------- |
| 12 | + ``` |
| 13 | + $ git commit -am "Prepare version X.Y.Z" |
| 14 | + ``` |
21 | 15 |
|
22 | | -In `~/.gradle/gradle.properties`, set the following: |
| 16 | +4. Tag |
23 | 17 |
|
24 | | - * `SONATYPE_NEXUS_USERNAME` - Sonatype username for releasing to `com.squareup`. |
25 | | - * `SONATYPE_NEXUS_PASSWORD` - Sonatype password for releasing to `com.squareup`. |
| 18 | + ``` |
| 19 | + $ git tag -am "Version X.Y.Z" X.Y.Z |
| 20 | + ``` |
| 21 | + |
| 22 | +5. Update the `VERSION_NAME` in `gradle.properties` to the next "SNAPSHOT" version. |
| 23 | + |
| 24 | +6. Commit |
| 25 | + |
| 26 | + ``` |
| 27 | + $ git commit -am "Prepare next development version" |
| 28 | + ``` |
| 29 | + |
| 30 | +7. Push! |
| 31 | + |
| 32 | + ``` |
| 33 | + $ git push && git push --tags |
| 34 | + ``` |
| 35 | + |
| 36 | + This will trigger a GitHub Action workflow which will create a GitHub release and upload the |
| 37 | + release artifacts to Maven Central. |
0 commit comments