|
| 1 | +# Release flow |
| 2 | + |
| 3 | +Please follow the steps below to release a new version of Keva. |
| 4 | + |
| 5 | +Requirements: |
| 6 | + |
| 7 | +- Unix shell |
| 8 | +- GPG key |
| 9 | +- Sonatype Nexus credentials (need to request) |
| 10 | +- Docker Hub credentials (need to request) |
| 11 | + |
| 12 | +If you do not have these, please email `[email protected]` to request. |
| 13 | + |
| 14 | +## Preparation |
| 15 | + |
| 16 | +Before each release, we can group issues in a [GitHub's Milestone](https://github.com/keva-dev/keva/milestones), |
| 17 | +create a GitHub milestone, and assign it to the `release` label, the milestone name should be `vX.Y.Z`. |
| 18 | + |
| 19 | +## Create release branch |
| 20 | + |
| 21 | +First, please create a release branch from `master` branch: |
| 22 | + |
| 23 | +``` |
| 24 | +git fetch |
| 25 | +git checkout master |
| 26 | +git pull origin master |
| 27 | +### Add a new release branch, e.g. `release/1.1.0` |
| 28 | +git checkout -b release/1.1.0 |
| 29 | +``` |
| 30 | + |
| 31 | +Then, please pull (rebasing) the latest changes from `develop` branch or cherry-pick the commits: |
| 32 | + |
| 33 | +``` |
| 34 | +git fetch |
| 35 | +git pull origin develop --rebase |
| 36 | +``` |
| 37 | + |
| 38 | +Push the release branch to `origin`: |
| 39 | + |
| 40 | +``` |
| 41 | +git push origin release/1.1.0 |
| 42 | +``` |
| 43 | + |
| 44 | +And create a pull request on Github, request reviewers, after the pull request is merged, you can release the new version. |
| 45 | + |
| 46 | +Create a version tag (via git command or Github UI): |
| 47 | + |
| 48 | +``` |
| 49 | +git tag -a v1.1.0 -m "Keva v1.0.0-rc0" |
| 50 | +``` |
| 51 | + |
| 52 | +Remember to add binary artifacts to the release tag (check how to get binary artifacts below). |
| 53 | + |
| 54 | +## Build binary (bash based) artifacts |
| 55 | + |
| 56 | +Run: |
| 57 | + |
| 58 | +```bash |
| 59 | +sh build.sh |
| 60 | +``` |
| 61 | + |
| 62 | +## Publish to Maven Central |
| 63 | + |
| 64 | +Update version at `build.gradle`: |
| 65 | + |
| 66 | +``` |
| 67 | +group 'dev.keva' |
| 68 | +version '1.0.0-rc0' |
| 69 | +``` |
| 70 | + |
| 71 | +Set environment variables at `./gradlew.properties`: |
| 72 | + |
| 73 | +``` |
| 74 | +sonatypeUsername=SONARUSERNAME |
| 75 | +sonatypePassword=SONARPASSWORD |
| 76 | +signing.keyId=KeyID # e.g. "0xAA279C9C" |
| 77 | +signing.password=password |
| 78 | +signing.secretKeyRingFile=FileLocation # e.g. "/Users/keva/.gnupg/secring.gpg" |
| 79 | +``` |
| 80 | + |
| 81 | +Run: |
| 82 | + |
| 83 | +```bash |
| 84 | +./gradlew publish |
| 85 | +``` |
| 86 | + |
| 87 | +## Publish to Docker Hub |
| 88 | + |
| 89 | +Login to Docker Hub: |
| 90 | + |
| 91 | +```bash |
| 92 | +docker login -u kevadev -p kevapassword |
| 93 | +``` |
| 94 | + |
| 95 | +Build Docker image: |
| 96 | + |
| 97 | +```bash |
| 98 | +docker build -t keva-server . |
| 99 | +``` |
| 100 | + |
| 101 | +Tag and push image: |
| 102 | + |
| 103 | +```bash |
| 104 | +docker tag keva-server:latest kevadev/keva-server:1.0.0-rc0 |
| 105 | +docker push kevadev/keva-server:1.1.0 |
| 106 | +``` |
0 commit comments