You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

161 lines
8.8 KiB

  1. # Releases
  2. Tendermint uses [semantic versioning](https://semver.org/) with each release following
  3. a `vX.Y.Z` format. The `master` branch is used for active development and thus it's
  4. advisable not to build against it.
  5. The latest changes are always initially merged into `master`.
  6. Releases are specified using tags and are built from long-lived "backport" branches
  7. that are cut from `master` when the release process begins.
  8. Each release "line" (e.g. 0.34 or 0.33) has its own long-lived backport branch,
  9. and the backport branches have names like `v0.34.x` or `v0.33.x`
  10. (literally, `x`; it is not a placeholder in this case). Tendermint only
  11. maintains the last two releases at a time (the oldest release is predominantly
  12. just security patches).
  13. ## Backporting
  14. As non-breaking changes land on `master`, they should also be backported
  15. to these backport branches.
  16. We use Mergify's [backport feature](https://mergify.io/features/backports) to automatically backport
  17. to the needed branch. There should be a label for any backport branch that you'll be targeting.
  18. To notify the bot to backport a pull request, mark the pull request with the label corresponding
  19. to the correct backport branch. For example, to backport to v0.35.x, add the label `S:backport-to-v0.35.x`.
  20. Once the original pull request is merged, the bot will try to cherry-pick the pull request
  21. to the backport branch. If the bot fails to backport, it will open a pull request.
  22. The author of the original pull request is responsible for solving the conflicts and
  23. merging the pull request.
  24. ### Creating a backport branch
  25. If this is the first release candidate for a major release, you get to have the honor of creating
  26. the backport branch!
  27. Note that, after creating the backport branch, you'll also need to update the
  28. tags on `master` so that `go mod` is able to order the branches correctly. You
  29. should tag `master` with a "dev" tag that is "greater than" the backport
  30. branches tags. See [#6072](https://github.com/tendermint/tendermint/pull/6072)
  31. for more context.
  32. In the following example, we'll assume that we're making a backport branch for
  33. the 0.35.x line.
  34. 1. Start on `master`
  35. 2. Create and push the backport branch:
  36. `git checkout -b v0.35.x; git push origin v0.35.x`
  37. 3. Go back to master and tag it as the dev branch for the _next_ major release and push it back up:
  38. `git tag -a v0.36.0-dev -m "Development base for Tendermint v0.36."; git push origin v0.36.0-dev`
  39. 4. Create a new workflow (still on master) to run e2e nightlies for the new backport branch.
  40. (See https://github.com/tendermint/tendermint/blob/master/.github/workflows/e2e-nightly-master.yml
  41. for an example.)
  42. 5. Add a new section to the Mergify config (`.github/mergify.yml`) to enable the
  43. backport bot to work on this branch, and add a corresponding `S:backport-to-v0.35.x`
  44. [label](https://github.com/tendermint/tendermint/labels) so the bot can be triggered.
  45. ## Release candidates
  46. Before creating an official release, especially a major release, we may want to create a
  47. release candidate (RC) for our friends and partners to test out. We use git tags to
  48. create RCs, and we build them off of backport branches.
  49. Tags for RCs should follow the "standard" release naming conventions, with `-rcX` at the end
  50. (for example, `v0.35.0-rc0`).
  51. (Note that branches and tags _cannot_ have the same names, so it's important that these branches
  52. have distinct names from the tags/release names.)
  53. If this is the first RC for a major release, you'll have to make a new backport branch (see above).
  54. Otherwise:
  55. 1. Start from the backport branch (e.g. `v0.35.x`).
  56. 2. Run the integration tests and the e2e nightlies
  57. (which can be triggered from the Github UI;
  58. e.g., https://github.com/tendermint/tendermint/actions/workflows/e2e-nightly-34x.yml).
  59. 3. Prepare the changelog:
  60. - Move the changes included in `CHANGELOG_PENDING.md` into `CHANGELOG.md`. Each RC should have
  61. it's own changelog section. These will be squashed when the final candidate is released.
  62. - Run `python ./scripts/linkify_changelog.py CHANGELOG.md` to add links for
  63. all PRs
  64. - Ensure that `UPGRADING.md` is up-to-date and includes notes on any breaking changes
  65. or other upgrading flows.
  66. - Bump TMVersionDefault version in `version.go`
  67. - Bump P2P and block protocol versions in `version.go`, if necessary.
  68. Check the changelog for breaking changes in these components.
  69. - Bump ABCI protocol version in `version.go`, if necessary
  70. 4. Open a PR with these changes against the backport branch.
  71. 5. Once these changes have landed on the backport branch, be sure to pull them back down locally.
  72. 6. Once you have the changes locally, create the new tag, specifying a name and a tag "message":
  73. `git tag -a v0.35.0-rc0 -m "Release Candidate v0.35.0-rc0`
  74. 7. Push the tag back up to origin:
  75. `git push origin v0.35.0-rc0`
  76. Now the tag should be available on the repo's releases page.
  77. 8. Future RCs will continue to be built off of this branch.
  78. Note that this process should only be used for "true" RCs--
  79. release candidates that, if successful, will be the next release.
  80. For more experimental "RCs," create a new, short-lived branch and tag that instead.
  81. ## Major release
  82. This major release process assumes that this release was preceded by release candidates.
  83. If there were no release candidates, begin by creating a backport branch, as described above.
  84. 1. Start on the backport branch (e.g. `v0.35.x`)
  85. 2. Run integration tests (`make test_integrations`) and the e2e nightlies.
  86. 3. Prepare the release:
  87. - "Squash" changes from the changelog entries for the RCs into a single entry,
  88. and add all changes included in `CHANGELOG_PENDING.md`.
  89. (Squashing includes both combining all entries, as well as removing or simplifying
  90. any intra-RC changes. It may also help to alphabetize the entries by package name.)
  91. - Run `python ./scripts/linkify_changelog.py CHANGELOG.md` to add links for
  92. all PRs
  93. - Ensure that `UPGRADING.md` is up-to-date and includes notes on any breaking changes
  94. or other upgrading flows.
  95. - Bump TMVersionDefault version in `version.go`
  96. - Bump P2P and block protocol versions in `version.go`, if necessary
  97. - Bump ABCI protocol version in `version.go`, if necessary
  98. 4. Open a PR with these changes against the backport branch.
  99. 5. Once these changes are on the backport branch, push a tag with prepared release details.
  100. This will trigger the actual release `v0.35.0`.
  101. - `git tag -a v0.35.0 -m 'Release v0.35.0'`
  102. - `git push origin v0.35.0`
  103. 6. Make sure that `master` is updated with the latest `CHANGELOG.md`, `CHANGELOG_PENDING.md`, and `UPGRADING.md`.
  104. 7. Add the release to the documentation site generator config (see
  105. [DOCS_README.md](./docs/DOCS_README.md) for more details). In summary:
  106. - Start on branch `master`.
  107. - Add a new line at the bottom of [`docs/versions`](./docs/versions) to
  108. ensure the newest release is the default for the landing page.
  109. - Add a new entry to `themeConfig.versions` in
  110. [`docs/.vuepress/config.js`](./docs/.vuepress/config.js) to include the
  111. release in the dropdown versions menu.
  112. ## Minor release (point releases)
  113. Minor releases are done differently from major releases: They are built off of
  114. long-lived backport branches, rather than from master. As non-breaking changes
  115. land on `master`, they should also be backported into these backport branches.
  116. Minor releases don't have release candidates by default, although any tricky
  117. changes may merit a release candidate.
  118. To create a minor release:
  119. 1. Checkout the long-lived backport branch: `git checkout v0.35.x`
  120. 2. Run integration tests (`make test_integrations`) and the nightlies.
  121. 3. Check out a new branch and prepare the release:
  122. - Copy `CHANGELOG_PENDING.md` to top of `CHANGELOG.md`
  123. - Run `python ./scripts/linkify_changelog.py CHANGELOG.md` to add links for all issues
  124. - Run `bash ./scripts/authors.sh` to get a list of authors since the latest release, and add the GitHub aliases of external contributors to the top of the CHANGELOG. To lookup an alias from an email, try `bash ./scripts/authors.sh <email>`
  125. - Reset the `CHANGELOG_PENDING.md`
  126. - Bump the TMDefaultVersion in `version.go`
  127. - Bump the ABCI version number, if necessary.
  128. (Note that ABCI follows semver, and that ABCI versions are the only versions
  129. which can change during minor releases, and only field additions are valid minor changes.)
  130. 4. Open a PR with these changes that will land them back on `v0.35.x`
  131. 5. Once this change has landed on the backport branch, make sure to pull it locally, then push a tag.
  132. - `git tag -a v0.35.1 -m 'Release v0.35.1'`
  133. - `git push origin v0.35.1`
  134. 6. Create a pull request back to master with the CHANGELOG & version changes from the latest release.
  135. - Remove all `R:minor` labels from the pull requests that were included in the release.
  136. - Do not merge the backport branch into master.