|
| 1 | +# Releasing |
| 2 | + |
| 3 | +This document outlines how to create a release of pluginrpc-go. |
| 4 | + |
| 5 | +1. Clone the repo, ensuring you have the latest main. |
| 6 | + |
| 7 | +2. On a new branch, open [pluginrpc.go](pluginrpc.go) and change the `Version` constant to an |
| 8 | + appropriate [semantic version](https://semver.org/). To select the correct version, look at the |
| 9 | + version number of the [latest release] and the changes that are included in this new release. |
| 10 | + |
| 11 | +- If there are only bug fixes and no new features, remove the `-dev` suffix, set MINOR number to be |
| 12 | + equal to the [latest release], and set the PATCH number to be 1 more than the PATCH number of the |
| 13 | + [latest release]. |
| 14 | +- If there are features being released, remove the `-dev` suffix, set the MINOR number to be 1 more |
| 15 | + than the MINOR number of the [latest release], and set the PATCH number to `0`. In the common |
| 16 | + case, the diff here will just be to remove the `-dev` suffix. |
| 17 | + |
| 18 | +```patch |
| 19 | +-const Version = "1.14.0-dev" |
| 20 | ++const Version = "1.14.0" |
| 21 | +``` |
| 22 | + |
| 23 | +3. Check for any changes in |
| 24 | + [cmd/protoc-gen-pluginrpc-go/main.go](cmd/protoc-gen-pluginrpc-go/main.go) that require a version |
| 25 | + restriction. A constant `IsAtLeastVersionX_Y_Z` should be defined in [pluginrpc.go](pluginrpc.go) |
| 26 | + if generated code has begun to use a new API. Make sure the generated code references this |
| 27 | + constant. If a new constant has been added since the last release, ensure that the name of the |
| 28 | + constant matches the version being released. |
| 29 | + |
| 30 | +4. Open a PR titled "Prepare for vX.Y.Z" and a description tagging all current maintainers. Once |
| 31 | + it's reviewed and CI passes, merge it. |
| 32 | + |
| 33 | + _Make sure no new commits are merged until the release is complete._ |
| 34 | + |
| 35 | +5. Review all commits in the new release and for each PR check an appropriate label is used and edit |
| 36 | + the title to be meaninful to end users. This will help auto-generated release notes match the |
| 37 | + final notes as closely as possible. |
| 38 | + |
| 39 | +6. Using the Github UI, create a new release. |
| 40 | + |
| 41 | + - Under “Choose a tag”, type in “vX.Y.Z” to create a new tag for the release upon publish. |
| 42 | + - Target the main branch. |
| 43 | + - Title the Release “vX.Y.Z”. |
| 44 | + - Click “set as latest release”. |
| 45 | + - Set the last version as the “Previous tag”. |
| 46 | + - Click “Generate release notes” to autogenerate release notes. |
| 47 | + - Edit the release notes. |
| 48 | + |
| 49 | +7. Publish the release. |
| 50 | + |
| 51 | +8. On a new branch, open [pluginrpc.go](pluginrpc.go) and change the `Version` to increment the minor |
| 52 | + tag and append the `-dev` suffix. Use the next minor release - we never anticipate bugs and patch |
| 53 | + releases. |
| 54 | + |
| 55 | + ```patch |
| 56 | + -const Version = "1.14.0" |
| 57 | + +const Version = "1.15.0-dev" |
| 58 | + ``` |
| 59 | + |
| 60 | +9. Open a PR titled "Back to development" Once it's reviewed and CI passes, merge it. |
| 61 | + |
| 62 | +[latest release]: https://github.com/pluginrpc/pluginrpc-go/releases/latest |
0 commit comments