|
| 1 | +# Releasing |
| 2 | + |
| 3 | +The following artifacts are created as a result of releasing Fabric Chaincode Java: |
| 4 | + |
| 5 | +- docker images |
| 6 | + - [fabric-javaenv](https://hub.docker.com/r/hyperledger/fabric-javaenv) |
| 7 | +- Java libraries |
| 8 | + - [fabric-chaincode-shim](https://search.maven.org/search?q=a:fabric-chaincode-shim) |
| 9 | + - [fabric-chaincode-protos](https://search.maven.org/search?q=a:fabric-chaincode-protos) |
| 10 | + |
| 11 | +**Note:** A docker image with a matching V.R version is required before releasing a new version of Fabric. |
| 12 | + |
| 13 | +## Before releasing |
| 14 | + |
| 15 | +It's useful to create an issue to keep track of each release, for example [Release v2.1.0](https://jira.hyperledger.org/browse/FABCJ-283). |
| 16 | + |
| 17 | +The following tasks are required before releasing: |
| 18 | + |
| 19 | +- Update version numbers in `build.gradle` files to the required version |
| 20 | +- Update test, sample, and docs files to match the new version |
| 21 | +- Create a new release notes file |
| 22 | +- Update the `CHANGELOG.md` file |
| 23 | + |
| 24 | + The `changelog.sh` script in `scripts` will prepopulate the changelog but you must check and edit the file manually afterwards as required |
| 25 | + |
| 26 | +See the [[FABCJ-289] release: 2.2.0 LTS](https://github.com/hyperledger/fabric-chaincode-java/pull/124) pull request for an example, although be careful to search for all versions in the codebase as they're easy to miss and things change! |
| 27 | + |
| 28 | +## Create release |
| 29 | + |
| 30 | +Creating a GitHub release on the [releases page](https://github.com/hyperledger/fabric-chaincode-java/releases) will trigger the build to publish the new release. |
| 31 | + |
| 32 | +When drafting the release, create a new tag for the new version (with a `v` prefix), e.g. `v2.1.4` |
| 33 | + |
| 34 | +See previous releases for examples of the title and description. |
| 35 | + |
| 36 | +## Publish Java libraries |
| 37 | + |
| 38 | +Log on to [https://oss.sonatype.org/#welcome] and _manually click two buttons_ to publish the JARs which were pushed by the release build. |
| 39 | + |
| 40 | +## After releasing |
| 41 | + |
| 42 | +- Update version numbers in `build.gradle` files to the next version |
| 43 | +- Update test, sample, and docs files to match the new version |
| 44 | + |
| 45 | +See the [Bump version to 2.2.1](https://github.com/hyperledger/fabric-chaincode-java/pull/127) pull request for an example. It should include almost all the files changed to prepare for the release, except for the release notes and changelog which do not need updating. |
0 commit comments