|
| 1 | +# How to Create a Release of OpenTelemetry Proto (for Maintainers Only) |
| 2 | + |
| 3 | +## Tagging the Release |
| 4 | + |
| 5 | +Our release branches follow the naming convention of `v<major>.<minor>.x`, while |
| 6 | +the tags include the patch version `v<major>.<minor>.<patch>`. For example, the |
| 7 | +same branch `v0.3.x` would be used to create all `v0.3` tags (e.g. `v0.3.0`, |
| 8 | +`v0.3.1`). |
| 9 | + |
| 10 | +In this section upstream repository refers to the main opentelemetry-proto |
| 11 | +github repository. |
| 12 | + |
| 13 | +Before any push to the upstream repository you need to create a [personal access |
| 14 | +token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/). |
| 15 | + |
| 16 | +1. Create the release branch and push it to GitHub: |
| 17 | + |
| 18 | + ```bash |
| 19 | + MAJOR=0 MINOR=3 PATCH=0 # Set appropriately for new release |
| 20 | + git checkout -b v$MAJOR.$MINOR.x master |
| 21 | + git push upstream v$MAJOR.$MINOR.x |
| 22 | + ``` |
| 23 | + |
| 24 | +2. Enable branch protection for the new branch, if you have admin access. |
| 25 | + Otherwise, let someone with admin access know that there is a new release |
| 26 | + branch. |
| 27 | + |
| 28 | + - Open the branch protection settings for the new branch, by following |
| 29 | + [Github's instructions](https://help.github.com/articles/configuring-protected-branches/). |
| 30 | + - Copy the settings from a previous branch, i.e., check |
| 31 | + - `Protect this branch` |
| 32 | + - `Require pull request reviews before merging` |
| 33 | + - `Require status checks to pass before merging` |
| 34 | + - `Include administrators` |
| 35 | +
|
| 36 | + Enable the following required status checks: |
| 37 | + - `cla/linuxfoundation` |
| 38 | + - `ci/circleci: build` |
| 39 | + - Uncheck everything else. |
| 40 | + - Click "Save changes". |
| 41 | +
|
| 42 | +3. For `vMajor.Minor.x` branch: |
| 43 | +
|
| 44 | + - Create and push a tag: |
| 45 | +
|
| 46 | + ```bash |
| 47 | + git checkout v$MAJOR.$MINOR.x |
| 48 | + git pull upstream v$MAJOR.$MINOR.x |
| 49 | + git tag -a v$MAJOR.$MINOR.$PATCH -m "Version $MAJOR.$MINOR.$PATCH" |
| 50 | + git push upstream v$MAJOR.$MINOR.x |
| 51 | + ``` |
| 52 | +
|
| 53 | +## Patch Release |
| 54 | +
|
| 55 | +All patch releases should include only bug-fixes, and must avoid |
| 56 | +adding/modifying the public APIs. To cherry-pick one commit use the following |
| 57 | +instructions: |
| 58 | +
|
| 59 | +- Create and push a tag: |
| 60 | +
|
| 61 | +```bash |
| 62 | +COMMIT=1224f0a # Set the right commit hash. |
| 63 | +git checkout -b cherrypick v$MAJOR.$MINOR.x |
| 64 | +git cherry-pick -x $COMMIT |
| 65 | +git commit -a -m "Cherry-pick commit $COMMIT" |
| 66 | +``` |
| 67 | +
|
| 68 | +- Go through PR review and merge it to GitHub v$MAJOR.$MINOR.x branch. |
| 69 | +
|
| 70 | +- Tag a new patch release when all commits are merged. |
| 71 | +
|
| 72 | +## Announcement |
| 73 | +
|
| 74 | +Once deployment is done, go to Github [release |
| 75 | +page](https://github.com/open-telemetry/opentelemetry-proto/releases), press |
| 76 | +`Draft a new release` to write release notes about the new release. |
| 77 | +
|
| 78 | +You can use `git log upstream/v$MAJOR.$((MINOR-1)).x..upstream/v$MAJOR.$MINOR.x --graph --first-parent` |
| 79 | +or the Github [compare tool](https://github.com/open-telemetry/opentelemetry-proto/compare/) |
| 80 | +to view a summary of all commits since last release as a reference. |
| 81 | +
|
| 82 | +In addition, you can refer to |
| 83 | +[CHANGELOG.md](https://github.com/open-telemetry/opentelemetry-proto/blob/master/CHANGELOG.md) |
| 84 | +for a list of major changes since last release. |
| 85 | +
|
| 86 | +## Update release versions in documentations and CHANGELOG files |
| 87 | +
|
| 88 | +After releasing is done, you need to update |
| 89 | +[README.md](https://github.com/open-telemetry/opentelemetry-proto/blob/master/README.md) and |
| 90 | +[CHANGELOG.md](https://github.com/open-telemetry/opentelemetry-proto/blob/master/CHANGELOG.md). |
| 91 | +
|
| 92 | +Create a PR to mark the new release in |
| 93 | +[CHANGELOG.md](https://github.com/census-instrumentation/opencensus-java/blob/master/CHANGELOG.md) |
| 94 | +on master branch. |
0 commit comments