| 1 |
# Releases |
| 2 |
|
| 3 |
To do a release: |
| 4 |
|
| 5 |
- Pick the new release name; it's probably `v0.x.0` where `x` is whatever the |
| 6 |
[last release](https://github.com/google/go-cloud/releases/latest) was plus |
| 7 |
one, but follow [semantic versioning](https://semver.org/). |
| 8 |
|
| 9 |
- Consider updating dependencies via `internal/testing/update_deps.sh` if it |
| 10 |
hasn't been done recently. Do this as a separte step before the release. |
| 11 |
|
| 12 |
- Create a new branch for the release (`git checkout -B prerelease`). |
| 13 |
|
| 14 |
- Update the `User-Agent` version in internal/useragent/useragent.go. |
| 15 |
|
| 16 |
- Run the release helper tool to remove `replace` lines from the `go.mod` |
| 17 |
files of submodules: |
| 18 |
|
| 19 |
```bash |
| 20 |
$ go run internal/releasehelper/releasehelper.go dropreplace |
| 21 |
``` |
| 22 |
|
| 23 |
- Run the release helper tool to set the version in `require` directives of |
| 24 |
submodules to the new (yet unreleased) version: |
| 25 |
|
| 26 |
```bash |
| 27 |
$ go run internal/releasehelper/releasehelper.go setversion v0.x.0 |
| 28 |
``` |
| 29 |
|
| 30 |
- Commit and create a PR. Tests will fail for this PR because submodules depend on a |
| 31 |
version of the main module that wasn't tagged yet, so you may have to |
| 32 |
force-merge the PR. Note that this does not affect users, since a new |
| 33 |
version hasn't been tagged yet. |
| 34 |
|
| 35 |
- `git sync` your local client and move to the master branch. |
| 36 |
|
| 37 |
- Tag new versions by running `./internal/testing/git_tag_modules.sh v0.X.0`. |
| 38 |
|
| 39 |
- Push tags to upstream with `git push upstream --tags` |
| 40 |
|
| 41 |
- Go to [Releases](https://github.com/google/go-cloud/releases). Click `Draft |
| 42 |
a new release`, enter your release name, select your tag from the dropdown, |
| 43 |
and enter release notes by clicking "Generate Release Notes". |
| 44 |
|
| 45 |
- Add a section for breaking changes, if any. They should be marked with |
| 46 |
`BREAKING_CHANGE` in the PR title; however, that's not enforced so do |
| 47 |
your best to look for them. |
| 48 |
- Update the list of changes to remove anything that's not interesting |
| 49 |
(e.g., updating dependencies, prerelease, minor cleanups, etc.). |
| 50 |
|
| 51 |
- Send an email to |
| 52 |
[[email protected]](https://groups.google.com/forum/#!forum/go-cloud) |
| 53 |
announcing the release, and including the release notes. |
| 54 |
|
| 55 |
- Create a new branch for the postrelease (`git checkout -B postrelease`). |
| 56 |
|
| 57 |
- Add back `replace` lines: |
| 58 |
|
| 59 |
```bash |
| 60 |
$ go run internal/releasehelper/releasehelper.go addreplace |
| 61 |
``` |
| 62 |
|
| 63 |
Run tests and send out a PR as usual. |