|
| 1 | +# How to Create a Release of OpenTelemetry Configuration (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-configuration |
| 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 main |
| 21 | + git push upstream v$MAJOR.$MINOR.x |
| 22 | + ``` |
| 23 | + |
| 24 | +2. For `vMajor.Minor.x` branch: |
| 25 | + |
| 26 | + - Create and push a tag: |
| 27 | + |
| 28 | + ```bash |
| 29 | + git checkout v$MAJOR.$MINOR.x |
| 30 | + git pull upstream v$MAJOR.$MINOR.x |
| 31 | + git tag -a v$MAJOR.$MINOR.$PATCH -m "Version $MAJOR.$MINOR.$PATCH" |
| 32 | + git push upstream v$MAJOR.$MINOR.$PATCH |
| 33 | + ``` |
| 34 | + |
| 35 | +## Patch Release |
| 36 | + |
| 37 | +All patch releases should include only bug-fixes, and must avoid |
| 38 | +adding/modifying the public APIs. To cherry-pick one commit use the following |
| 39 | +instructions: |
| 40 | + |
| 41 | +- Create and push a tag: |
| 42 | + |
| 43 | +```bash |
| 44 | +COMMIT=1224f0a # Set the right commit hash. |
| 45 | +git checkout -b cherrypick v$MAJOR.$MINOR.x |
| 46 | +git cherry-pick -x $COMMIT |
| 47 | +git commit -a -m "Cherry-pick commit $COMMIT" |
| 48 | +``` |
| 49 | + |
| 50 | +- Go through PR review and merge it to GitHub v$MAJOR.$MINOR.x branch. |
| 51 | + |
| 52 | +- Tag a new patch release when all commits are merged. |
| 53 | + |
| 54 | +## Announcement |
| 55 | + |
| 56 | +Once deployment is done, go to Github [release |
| 57 | +page](https://github.com/open-telemetry/opentelemetry-configuration/releases), press |
| 58 | +`Draft a new release` to write release notes about the new release. |
| 59 | + |
| 60 | +You can use `git log upstream/v$MAJOR.$((MINOR-1)).x..upstream/v$MAJOR.$MINOR.x --graph --first-parent` |
| 61 | +or the Github [compare tool](https://github.com/open-telemetry/opentelemetry-configuration/compare/) |
| 62 | +to view a summary of all commits since last release as a reference. |
| 63 | + |
| 64 | +In addition, you can refer to [CHANGELOG.md](CHANGELOG.md) |
| 65 | +for a list of major changes since last release. |
| 66 | + |
| 67 | +## Update release versions in documentations and CHANGELOG files |
| 68 | + |
| 69 | +After releasing is done, you need to update the [CHANGELOG.md](CHANGELOG.md). |
| 70 | + |
| 71 | +Create a PR to mark the new release in [CHANGELOG.md](CHANGELOG.md) on main branch. |
0 commit comments