From 3e104db9af14bed5785d200d57f13f6b16feeef1 Mon Sep 17 00:00:00 2001 From: galargh Date: Thu, 10 Nov 2022 14:03:10 +0100 Subject: [PATCH 01/12] docs: update header in release issue template --- docs/RELEASE_ISSUE_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index 9edf679c130..cd4048b6be5 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -1,4 +1,4 @@ - + > Release Issue Template. If doing a patch release, see [here](https://github.com/ipfs/kubo/blob/master/docs/PATCH_RELEASE_TEMPLATE.md) From 9fafe50faee6f375bad12461996d92f0dd9c34f8 Mon Sep 17 00:00:00 2001 From: Steve Loeppky Date: Thu, 10 Nov 2022 15:28:45 -0800 Subject: [PATCH 02/12] Update RELEASE_ISSUE_TEMPLATE.md Making some changes that am seeing so far. Some of these changes are so I can leave PR comments. --- docs/RELEASE_ISSUE_TEMPLATE.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index cd4048b6be5..7836f537dc7 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -14,7 +14,7 @@ * Release reviewer: @who * Expected RC date: week of YYYY-MM-DD * 🚢 Expected final release date: YYYY-MM-DD -* Accompanying PR for improving the release process: (example: https://github.com/ipfs/kubo/pull/9100) +* Accompanying PR for improving the release process: (example: https://github.com/ipfs/kubo/pull/9391) See the [Kubo release process](https://pl-strflt.notion.site/Kubo-Release-Process-5a5d066264704009a28a79cff93062c4) for more info. @@ -41,11 +41,13 @@ As usual, this release includes important fixes, some of which may be critical f Checklist: - [ ] **Stage 0 - Prerequisites** - - [ ] Open an issue against [bifrost-infra](https://github.com/protocol/bifrost-infra) ahead of the release ([example](https://github.com/protocol/bifrost-infra/issues/2109)). + - [ ] Open an issue against [bifrost-infra](https://github.com/protocol/bifrost-infra) ahead of the release ([example](https://github.com/protocol/bifrost-infra/issues/2109)). **Idealy, do this multiple days in advance of the RC** to give Bifrost the heads up that asks will be coming their way. - [ ] Spell out all that we want updated - gateways, the bootstraper and the cluster/preload nodes - [ ] Mention @protocol/bifrost-team in the issue and let them know the expected date of the release + * Issue link: - [ ] Ensure that the `What's left for release` section has all the checkboxes checked. If that's not the case, discuss the open items with Kubo maintainers and update the release schedule accordingly. - - [ ] Create `docs-release-vX.Y.Z` branch, open a draft PR and keep updating `docs/RELEASE_ISSUE_TEMPLATE.md` on that branch as you go. + - [ ] Create `docs-release-vX.Y.Z` branch, open a draft PR and keep updating `docs/RELEASE_ISSUE_TEMPLATE.md` on that branch as you go ([example](https://github.com/ipfs/kubo/pull/9391)). + - [ ] Link it in the "Meta" section above. - [ ] Ensure you have a [GPG key generated](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key) and [added to your GitHub account](https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account). This will enable you to created signed tags. - [ ] Ensure you have [admin access](https://discuss.ipfs.tech/g/admins) to [IPFS Discourse](https://discuss.ipfs.tech/). Admin access is required to globally pin posts and create banners. @2color might be able to assist you. - [ ] Access to [#bifrost](https://filecoinproject.slack.com/archives/C03MMMF606T) channel in FIL Slack might come in handy. Ask the release reviewer to invite you over. @@ -54,11 +56,12 @@ Checklist: - [ ] You're also going to need NPM installed on your system. See [here](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) for instructions. - [ ] Prepare changelog proposal in [docs/changelogs/vX.Y.md](https://github.com/ipfs/kubo/blob/master/docs/changelogs/). - Skip filling out the `### Changelog` section (the one where which lists all the commits and contributors) for now. We will populate it after the release branch is cut. + - PR link: - [ ] Install ZSH ([instructions](https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH#install-and-set-up-zsh-as-default)). It is needed by the changelog creation script. - [ ] Ensure you have `kubo` checked out under `$(go env GOPATH)/src/github.com/ipfs/kubo`. This is required by the changelog creation script. - If you want your clone to live in a different location, you can symlink it to the expected location by running `mkdir -p $(go env GOPATH)/src/github.com/ipfs && ln -s $(pwd) $(go env GOPATH)/src/github.com/ipfs/kubo`. - [ ] Ensure that [README.md](https://github.com/ipfs/go-ipfs/tree/master/README.md) is up to date. -- [ ] **Stage 1 - Initial Preparations** +- [ ] **Stage 1 - Initial Preparations** - [ ] Upgrade to the latest patch release of Go that CircleCI has published (currently used version: `1.19.1`) - [ ] See the list here: https://hub.docker.com/r/cimg/go/tags - [ ] [ipfs/distributions](https://github.com/ipfs/distributions): bump [this version](https://github.com/ipfs/distributions/blob/master/.tool-versions#L2) @@ -108,7 +111,7 @@ Checklist: - [ ] IPFS Discord #ipfs-chatter - [ ] FIL Slack #ipfs-chatter - [ ] Matrix https://matrix.to/#/#ipfs-chatter:ipfs.io - - [ ] Mention [early testers](https://github.com/ipfs/go-ipfs/tree/master/docs/EARLY_TESTERS.md) in the comment under the release issue ([example](https://github.com/ipfs/kubo/issues/9237#issuecomment-1258072509)). + - [ ] Mention [early testers](https://github.com/ipfs/go-ipfs/tree/master/docs/EARLY_TESTERS.md) in the comment under the release issue ([example](https://github.com/ipfs/kubo/issues/9319#issuecomment-1311002478)). - [ ] **Stage 3 - Internal Testing** - [ ] Library Testing. - [ ] [interop](https://github.com/ipfs/interop) @@ -226,7 +229,5 @@ Checklist: Would you like to contribute to the IPFS project and don't know how? Well, there are a few places you can get started: - Check the issues with the `help wanted` label in the [ipfs/kubo repo](https://github.com/ipfs/kubo/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) -- Join an IPFS All Hands, introduce yourself and let us know where you would like to contribute - https://github.com/ipfs/team-mgmt/#weekly-ipfs-all-hands -- Hack with IPFS and show us what you made! The All Hands call is also the perfect venue for demos, join in and show us what you built -- Join the discussion at [discuss.ipfs.io](https://discuss.ipfs.io/) and help users finding their answers. -- Join the [🚀 IPFS Core Implementations Weekly Sync 🛰](https://github.com/ipfs/team-mgmt/issues/992) and be part of the action! +- Join the discussion at [discuss.ipfs.tech](https://discuss.ipfs.tech/) and help users finding their answers. +- See other options at https://docs.ipfs.tech/community/ From 350f58e5817b31a580acc2336d47f7a74db3e217 Mon Sep 17 00:00:00 2001 From: galargh Date: Tue, 15 Nov 2022 13:56:34 +0100 Subject: [PATCH 03/12] docs: add instructions on how to complete RC via CLI --- docs/RELEASE_ISSUE_TEMPLATE.md | 251 +++++++++++++++++++++++++++++++-- 1 file changed, 243 insertions(+), 8 deletions(-) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index 7836f537dc7..24964d69bc3 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -44,10 +44,47 @@ Checklist: - [ ] Open an issue against [bifrost-infra](https://github.com/protocol/bifrost-infra) ahead of the release ([example](https://github.com/protocol/bifrost-infra/issues/2109)). **Idealy, do this multiple days in advance of the RC** to give Bifrost the heads up that asks will be coming their way. - [ ] Spell out all that we want updated - gateways, the bootstraper and the cluster/preload nodes - [ ] Mention @protocol/bifrost-team in the issue and let them know the expected date of the release - * Issue link: + - Issue link: +
+ # create new issue in protocol/bifrost-infra + gh api \ + --method POST \ + --raw-field "title=Rollout Kubo v0.17.0-RC1" \ + --raw-field "body=## What should be updated + + - [ ] Gateways + - [ ] Bootstrapper + - [ ] Cluster/Preload nodes + + ## When + + YYYY-MM-DD" \ + repos/protocol/bifrost-infra/issues +
- [ ] Ensure that the `What's left for release` section has all the checkboxes checked. If that's not the case, discuss the open items with Kubo maintainers and update the release schedule accordingly. - - [ ] Create `docs-release-vX.Y.Z` branch, open a draft PR and keep updating `docs/RELEASE_ISSUE_TEMPLATE.md` on that branch as you go ([example](https://github.com/ipfs/kubo/pull/9391)). - - [ ] Link it in the "Meta" section above. + - [ ] Create `docs-release-vX.Y.Z` branch, open a draft PR and keep updating `docs/RELEASE_ISSUE_TEMPLATE.md` on that branch as you go. + - [ ] Link it in the "Meta" section above. +
+ # retrieve master ref for ipfs/kubo + gh api /repos/ipfs/kubo/git/ref/heads/master + + # create docs-release-v0.17.0 ref for ipfs/kubo + gh api \ + --method POST \ + /repos/ipfs/kubo/git/refs \ + -f ref='refs/heads/docs-release-v0.17.0' \ + -f sha='254d81a9d5595c3e637c7573d56125836d5f5055' + + # create draft PR from docs-release-v0.17.0 to master for ipfs/kubo + # requires docs-release-v0.17.0 to be modified + gh api \ + --method POST \ + /repos/ipfs/kubo/pulls \ + -f title='docs: release v0.17.0' \ + -f head='docs-release-v0.17.0' \ + -f base='master' \ + -f draft=true +
- [ ] Ensure you have a [GPG key generated](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key) and [added to your GitHub account](https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account). This will enable you to created signed tags. - [ ] Ensure you have [admin access](https://discuss.ipfs.tech/g/admins) to [IPFS Discourse](https://discuss.ipfs.tech/). Admin access is required to globally pin posts and create banners. @2color might be able to assist you. - [ ] Access to [#bifrost](https://filecoinproject.slack.com/archives/C03MMMF606T) channel in FIL Slack might come in handy. Ask the release reviewer to invite you over. @@ -56,49 +93,247 @@ Checklist: - [ ] You're also going to need NPM installed on your system. See [here](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) for instructions. - [ ] Prepare changelog proposal in [docs/changelogs/vX.Y.md](https://github.com/ipfs/kubo/blob/master/docs/changelogs/). - Skip filling out the `### Changelog` section (the one where which lists all the commits and contributors) for now. We will populate it after the release branch is cut. - - PR link: + - PR link: - [ ] Install ZSH ([instructions](https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH#install-and-set-up-zsh-as-default)). It is needed by the changelog creation script. - [ ] Ensure you have `kubo` checked out under `$(go env GOPATH)/src/github.com/ipfs/kubo`. This is required by the changelog creation script. - If you want your clone to live in a different location, you can symlink it to the expected location by running `mkdir -p $(go env GOPATH)/src/github.com/ipfs && ln -s $(pwd) $(go env GOPATH)/src/github.com/ipfs/kubo`. - [ ] Ensure that [README.md](https://github.com/ipfs/go-ipfs/tree/master/README.md) is up to date. -- [ ] **Stage 1 - Initial Preparations** +- [ ] **Stage 1 - Initial Preparations** - [ ] Upgrade to the latest patch release of Go that CircleCI has published (currently used version: `1.19.1`) - [ ] See the list here: https://hub.docker.com/r/cimg/go/tags +
+ # retrieve the latest version of cimg/go available + curl -s 'https://hub.docker.com/v2/repositories/cimg/go/tags' | jq -r '.results | map(.name) | map(select(. | test("^[0-9]+\\.[0-9]+\\.[0-9]+$"))) | .[0]' +
- [ ] [ipfs/distributions](https://github.com/ipfs/distributions): bump [this version](https://github.com/ipfs/distributions/blob/master/.tool-versions#L2) +
+ # checkout new branch + git checkout -b bump-go-version + + # replace the cimg/go version in .tool-versions in ipfs/distributions + sed -i 's/golang [0-9]\+\.[0-9]\+\.[0-9]\+/golang 1.19.3/g' .tool-versions + + # commit the change + git add .tool-versions + git commit -m "chore: bump go version to 1.19.3" + + # push the change + git push origin bump-go-version + + # open a PR + gh api /repos/ipfs/distributions/pulls \ + --method POST \ + -f title='chore: bump go version to 1.19.3' \ + -f head='bump-go-version' \ + -f base='master' +
- [ ] [ipfs/kubo](https://github.com/ipfs/kubo): [example PR](https://github.com/ipfs/kubo/pull/8599) - - [ ] [ipfs/ipfs-docs](https://github.com/ipfs/ipfs-docs): [example PR](https://github.com/ipfs/ipfs-docs/pull/1298) +
+ # checkout new branch + git checkout -b bump-go-version + + # replace the cimg/go version in .circleci/main.yml in ipfs/kubo + sed -i 's/cimg\/go:[0-9]\+\.[0-9]\+\.[0-9]\+/cimg\/go:1.19.3/g' .circleci/main.yml + + # replace golang version in Dockerfile + sed -i 's/golang:[0-9]\+\.[0-9]\+\.[0-9]\+/golang:1.19.3/g' Dockerfile + + # commit the change + git add .circleci/main.yml Dockerfile + git commit -m "chore: bump go version to 1.19.3" + + # push the change + git push origin bump-go-version + + # open a PR + gh api /repos/ipfs/kubo/pulls \ + --method POST \ + -f title='chore: bump go version to 1.19.3' \ + -f head='bump-go-version' \ + -f base='master' +
+ - [ ] [ipfs/ipfs-docs](https://github.com/ipfs/ipfs-docs): [example PR](https://github.com/ipfs/ipfs-docs/pull/1298) - only if the major version changed - [ ] Fork a new branch (`release-vX.Y.Z`) from `master`. +
+ # retrieve master ref for ipfs/kubo + gh api /repos/ipfs/kubo/git/ref/heads/master + + # create release-v0.17.0 ref for ipfs/kubo + gh api \ + --method POST \ + /repos/ipfs/kubo/git/refs \ + -f ref='refs/heads/release-v0.17.0' \ + -f sha='a4da8f6cc768c3e2cce9c2677a792b2c237066aa' +
- [ ] Bump the version in `version.go` in the `master` branch to `vX.(Y+1).0-dev` via a PR ([example](https://github.com/ipfs/kubo/pull/9305)). +
+ # checkout new branch + git checkout -b bump-version + + # replace the version in version.go + sed -i 's/const CurrentVersionNumber = "0.17.0-dev"/const CurrentVersionNumber = "0.18.0-dev"/g' version.go + + # commit the change + git add version.go + git commit -m "chore: bump version to v0.18.0-dev" + + # push the change + git push origin bump-version + + # open a PR + gh api /repos/ipfs/kubo/pulls \ + --method POST \ + -f title='chore: bump version to v0.18.0-dev' \ + -f head='bump-version' \ + -f base='master' +
- [ ] **Stage 2 - Release Candidate** - _if any [non-trivial](docs/releases.md#footnotes) changes need to be included in the release, return to this stage_ - [ ] Bump the version in `version.go` in the `release-vX.Y.Z` branch to `vX.Y.Z-rcN`. +
+ # checkout new branch + git checkout -b bump-release-version + + # replace the version in version.go + sed -i 's/const CurrentVersionNumber = "0.17.0-dev"/const CurrentVersionNumber = "0.17.0-rc1"/g' version.go + + # commit the change + git add version.go + git commit -m "chore: bump version to v0.17.0-rc1" + + # push the change + git push origin bump-release-version + + # open a PR + gh api /repos/ipfs/kubo/pulls \ + --method POST \ + -f title='chore: bump version to v0.17.0-rc1' \ + -f head='bump-release-version' \ + -f base='release-v0.17.0' +
- [ ] If applicable, add new commits to the `release-vX.Y.Z` branch from `master` using `git cherry-pick -x ...` - Note: `release-*` branches are protected. You can do all needed updates on a separated branch (e.g. `wip-release-vX.Y.Z`) and when everything is settled push to `release-vX.Y.Z` - [ ] Push the `release-vX.Y.Z` branch to GitHub (`git push origin release-vX.Y.Z`) and create a draft PR targetting `release` branch if it doesn't exist yet ([example](https://github.com/ipfs/kubo/pull/9306)). +
+ # open a PR + gh api /repos/ipfs/kubo/pulls \ + --method POST \ + -f title='wip: release v0.17.0' \ + -f head='release-v0.17.0' \ + -f base='release' \ + -f draft=true +
- [ ] Wait for CI to run and complete PR checks. All checks should pass. - [ ] Create a signed tag for the release candidate. - [ ] This is a dangerous operation, as it is difficult to reverse due to Go modules and automated Docker image publishing. Remember to verify the commands you intend to run for items marked with ⚠️ with the release reviewer. - [ ] ⚠️ Tag HEAD `release-vX.Y.Z` commit with `vX.Y.Z-rcN` (`git tag -s vX.Y.Z-rcN -m 'Pre-release X.Y.Z-rcn'`) - - [ ] Run `git show vX.Y.Z` to ensure the tag is correct. - - [ ] ⚠️ Push the `vX.Y.Z` tag to GitHub (`git push origin vX.Y.Z`; DO NOT USE `git push --tags` because it pushes all your local tags). +
+ # create a signed tag + git tag -s v0.17.0-rc1 -m 'Pre-release 0.17.0-rc1' +
+ - [ ] Run `git show vX.Y.Z-rc1` to ensure the tag is correct. +
+ # show the signed tag + git show v0.17.0-rc1 +
+ - [ ] ⚠️ Push the `vX.Y.Z-rc1` tag to GitHub (`git push origin vX.Y.Z-rc1`; DO NOT USE `git push --tags` because it pushes all your local tags). +
+ # show the signed tag + git push origin v0.17.0-rc1 +
- [ ] Add artifacts to https://dist.ipfs.tech by making a PR against [ipfs/distributions](https://github.com/ipfs/distributions) - [ ] Clone the `ipfs/distributions` repo locally. - [ ] Create a new branch (`kubo-release-vX.Y.Z-rcn`) from `master`. +
+ # checkout new branch + git checkout -b kubo-release-v0.17.0-rc1 +
- [ ] Run `./dist.sh add-version kubo vX.Y.Z-rcN` to add the new version to the `versions` file ([instructions](https://github.com/ipfs/distributions#usage)). - `dist.sh` will print _WARNING: not marking pre-release kubo vX.Y.Z-rc1n as the current version._. +
+ # add new kubo version to dist + ./dist.sh add-version kubo v0.17.0-rc1 +
- [ ] Push the `kubo-release-vX.Y.Z-rcn` branch to GitHub and create a PR from that branch ([example](https://github.com/ipfs/distributions/pull/760)). +
+ # push the change + git push origin kubo-release-v0.17.0-rc1 + + # open a PR + gh api /repos/ipfs/distributions/pulls \ + --method POST \ + -f title='chore: add kubo v0.17.0-rc1' \ + -f head='kubo-release-v0.17.0-rc1' \ + -f base='master' +
- [ ] Ask for a review from the release reviewer. - [ ] Enable auto-merge for the PR. - PR build will build the artifacts and generate a diff in around 30 minutes - PR will be merged automatically once the diff is approved - `master` build will publish the artifacts to https://dist.ipfs.io in around 30 minutes +
+ # get pull id + id=$(gh api --method GET /repos/ipfs/distributions/pulls -f head='kubo-release-v0.17.0-rc1' --jq '.[0].id') + + # enable automerge + gh api graphql -f pull="${id}" -f query='mutation($pull: ID!) { enablePullRequestAutoMerge(input: {pullRequestId: $pull, mergeMethod: SQUASH}) {} }' +
- [ ] Ensure that the artifacts are available at https://dist.ipfs.io +
+ # check if RC is available + curl --retry 5 --no-progress-meter https://dist.ipfs.tech/kubo/versions | grep -q v0.17.0-rc1 + echo $? +
- [ ] Publish the RC to [the NPM package](https://www.npmjs.com/package/go-ipfs?activeTab=versions) by running https://github.com/ipfs/npm-go-ipfs/actions/workflows/main.yml (it happens automatically but it is safe to speed up the process and kick of a run manually) +
+ # dispatch workflow + gh api /repos/ipfs/npm-go-ipfs/actions/workflows/main.yml/dispatches \ + --method POST \ + -f ref='master' + + # get workflow run + gh api /repos/ipfs/npm-go-ipfs/actions/workflows/main.yml/runs \ + --method GET \ + -f per_page='1' \ + --jq '.workflow_runs[0]' + + # get workflow job + gh api /repos/ipfs/npm-go-ipfs/actions/runs/3470515021/jobs \ + --method GET \ + -f per_page='1' \ + --jq '.jobs[0]' + + # check logs for version + gh api /repos/ipfs/npm-go-ipfs/actions/jobs/9499319520/logs \ + --method GET | grep -q '0.17.0-rc1' + echo $? +
- [ ] Cut a pre-release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/v0.16.0-rc1)) - Use `vX.Y.Z-rcN` as the tag. - Link to the release issue in the description. - Link to the relevant [changelog](https://github.com/ipfs/kubo/blob/master/docs/changelogs/) in the description. - Check `This is a pre-release`. +
+ # create a pre-release + body='See the related issue: https://github.com/ipfs/kubo/issues/9319 + + And the draft changelog: [docs/changelogs/v0.17.md](https://github.com/ipfs/kubo/blob/release-v0.17.0/docs/changelogs/v0.17.md)' + gh api /repos/ipfs/kubo/releases \ + --method POST \ + -f tag_name='v0.17.0-rc1' \ + -f name='v0.17.0-rc1' \ + -f body="${body}" \ + -F draft=false \ + -F prerelease=true \ + -F generate_release_notes=false \ + -F make_latest=false +
- [ ] Synchronize release artifacts by running [sync-release-assets](https://github.com/ipfs/kubo/actions/workflows/sync-release-assets.yml) workflow. +
+ # dispatch workflow + gh api /repos/ipfs/kubo/actions/workflows/sync-release-assets.yml/dispatches \ + --method POST \ + -f ref='master' +
- [ ] Announce the RC - [ ] Create a new post on [IPFS Discourse](https://discuss.ipfs.tech). ([example](https://discuss.ipfs.tech/t/kubo-v0-16-0-rc1-release-candidate-is-out/15248)) - Use `Kubo vX.Y.Z-rcn Release Candidate is out!` as the title. From 341c2ab460f909e00047bb6c702fc07991deead4 Mon Sep 17 00:00:00 2001 From: galargh Date: Tue, 15 Nov 2022 14:09:15 +0100 Subject: [PATCH 04/12] docs: create a final issue for bifrost (TODO) --- docs/RELEASE_ISSUE_TEMPLATE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index 24964d69bc3..28b0034819c 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -428,6 +428,7 @@ Checklist: - Copy the relevant [changelog](https://github.com/ipfs/kubo/blob/release/docs/changelogs/) into the release description. - Keep the release notes as trim as possible (e.g. remove top headers where possible, [example](https://github.com/ipfs/kubo/releases/tag/v0.15.0)) - [ ] Synchronize release artifacts by running [sync-release-assets](https://github.com/ipfs/kubo/actions/workflows/sync-release-assets.yml) workflow. + - [ ] TODO: https://github.com/protocol/bifrost-infra/issues/2184#issuecomment-1315279257 - [ ] Announce the release - [ ] Add a link to the release to this release issue as a comment. - [ ] Create a new post on [IPFS Discourse](https://discuss.ipfs.tech). ([example](https://discuss.ipfs.tech/t/kubo-v0-16-0-release-is-out/15286)) From 7b79f69c78f84e6117f78f1d78ef5be8cdf4a727 Mon Sep 17 00:00:00 2001 From: galargh Date: Tue, 15 Nov 2022 18:18:25 +0100 Subject: [PATCH 05/12] docs: internal testing as code --- docs/RELEASE_ISSUE_TEMPLATE.md | 51 ++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index 28b0034819c..3145f003922 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -348,24 +348,6 @@ Checklist: - [ ] Matrix https://matrix.to/#/#ipfs-chatter:ipfs.io - [ ] Mention [early testers](https://github.com/ipfs/go-ipfs/tree/master/docs/EARLY_TESTERS.md) in the comment under the release issue ([example](https://github.com/ipfs/kubo/issues/9319#issuecomment-1311002478)). - [ ] **Stage 3 - Internal Testing** - - [ ] Library Testing. - - [ ] [interop](https://github.com/ipfs/interop) - - [ ] Clone the `ipfs/interop` repo locally. - - [ ] Create a new branch (`kubo-release-vX.Y.Z-rcn`) from `master`. - - [ ] Update `go-ipfs` version to `vX.Y.Z-rcN` in [package.json](https://github.com/ipfs/interop/blob/master/package.json). - - [ ] Run `npm install` locally - - [ ] Push the `kubo-release-vX.Y.Z-rcn` branch to GitHub and create a draft PR from that branch ([example](https://github.com/ipfs/interop/pull/511)). - - [ ] [go-ipfs-api](https://github.com/ipfs/go-ipfs-api) - - [ ] Create a branch with kubo version pinned in the [test setup action](https://github.com/ipfs/go-ipfs-api/blob/master/.github/actions/go-test-setup/action.yml) ([example](https://github.com/ipfs/go-ipfs-api/commit/d156b808cc3aebafba65a38e5dd6993543a50e82)). - - [ ] Ensure that CI is green. - - [ ] Delete the branch. - - [ ] [go-ipfs-http-client](https://github.com/ipfs/go-ipfs-http-client) - - [ ] Create a branch with kubo version pinned in the [test setup action](https://github.com/ipfs/go-ipfs-http-client/blob/master/.github/actions/go-test-setup/action.yml) ([example](https://github.com/ipfs/go-ipfs-http-client/commit/8a057960d26f1c60fffef09be3b05ec3f2e71bba)). - - [ ] Ensure that CI is green. - - [ ] Delete the branch. - - [ ] [WebUI](https://github.com/ipfs-shipyard/ipfs-webui) - - [ ] Run [CI workflow](https://github.com/ipfs/ipfs-webui/actions/workflows/ci.yml) with `vX.Y.Z-rcN` for the `kubo-version` input. - - [ ] Ensure that CI is green. - [ ] Infrastructure Testing. - [ ] Update the issue against [bifrost-infra](https://github.com/protocol/bifrost-infra) ([example](https://github.com/protocol/bifrost-infra/issues/2109)). - [ ] Mention @protocol/bifrost-team in the issue to let them know the release is ready @@ -380,12 +362,45 @@ Checklist: - [ ] Push to a branch ([example](https://github.com/ipfs/ipfs-desktop/pull/1826/commits/b0a23db31ce942b46d95965ee6fe770fb24d6bde)) - [ ] Open a draft PR to track through the final release ([example](https://github.com/ipfs/ipfs-desktop/pull/1826)) - [ ] Ensure CI tests pass +
+ # checkout new branch + git checkout -b kubo-release-v0.17.0 + + # replace the go-ipfs version in package.json + sed -i 's/"go-ipfs": ".*"/"go-ipfs": "0.17.0-rc1"/' package.json + + # update package-lock.json + npm install + + # commit the change + git add package.json package-lock.json + git commit -m "chore: bump kubo version to v0.17.0-rc1" + + # push the change + git push origin kubo-release-v0.17.0 + + # open a PR + gh api /repos/ipfs/ipfs-desktop/pulls \ + --method POST \ + -f title='chore: bump kubo version to v0.17.0-rc1' \ + -f head='kubo-release-v0.17.0' \ + -f base='main' \ + -f title='chore: bump kubo version to v0.17.0' \ + -F draft=true +
- [ ] [IPFS Companion](https://github.com/ipfs-shipyard/ipfs-companion) - [ ] Start kubo daemon of the version to release. - [ ] Start a fresh chromium or chrome instance using `chromium --user-data-dir=$(mktemp -d)` (macos `/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=$(mktemp -d)`) - [ ] Start a fresh firefox instance using `firefox --profile $(mktemp -d)` (macos `/Applications/Firefox.app/Contents/MacOS/firefox --profile $(mktemp -d)`) - [ ] Install IPFS Companion from [vendor-specific store](https://github.com/ipfs/ipfs-companion/#readme). - [ ] Check that the comunication between Kubo daemon and IPFS companion is working properly checking if the number of connected peers changes. +
+ curl --retry 5 --no-progress-meter --output kubo.tar.gz https://dist.ipfs.tech/kubo/v0.17.0-rc1/kubo_v0.17.0-rc1_darwin-arm64.tar.gz + tar -xzvf kubo.tar.gz + export IPFS_PATH=$(mktemp -d) + ./kubo/ipfs init + ./kubo/ipfs daemon & +
- [ ] **Stage 5 - Release** - _ONLY FOR FINAL RELEASE_ - [ ] Prepare the `release` branch. - [ ] Bump the version in `version.go` in the `release-vX.Y.Z` branch to `vX.Y.Z`. From 2c2926b7ab3d6b5bcae4079a5b9ae9e1f05dfb6c Mon Sep 17 00:00:00 2001 From: galargh Date: Mon, 5 Dec 2022 09:47:25 +0100 Subject: [PATCH 06/12] docs: parameterise release issue template --- docs/RELEASE_ISSUE_TEMPLATE.md | 205 ++++++++++++++++++++++++--------- 1 file changed, 149 insertions(+), 56 deletions(-) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index 3145f003922..3ffce655e09 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -1,4 +1,4 @@ - + > Release Issue Template. If doing a patch release, see [here](https://github.com/ipfs/kubo/blob/master/docs/PATCH_RELEASE_TEMPLATE.md) @@ -49,7 +49,7 @@ Checklist: # create new issue in protocol/bifrost-infra gh api \ --method POST \ - --raw-field "title=Rollout Kubo v0.17.0-RC1" \ + --raw-field "title=Rollout Kubo vX.Y.Z-RCN" \ --raw-field "body=## What should be updated - [ ] Gateways @@ -68,20 +68,20 @@ Checklist: # retrieve master ref for ipfs/kubo gh api /repos/ipfs/kubo/git/ref/heads/master - # create docs-release-v0.17.0 ref for ipfs/kubo + # create docs-release-vX.Y.Z ref for ipfs/kubo gh api \ --method POST \ /repos/ipfs/kubo/git/refs \ - -f ref='refs/heads/docs-release-v0.17.0' \ + -f ref='refs/heads/docs-release-vX.Y.Z' \ -f sha='254d81a9d5595c3e637c7573d56125836d5f5055' - # create draft PR from docs-release-v0.17.0 to master for ipfs/kubo - # requires docs-release-v0.17.0 to be modified + # create draft PR from docs-release-vX.Y.Z to master for ipfs/kubo + # requires docs-release-vX.Y.Z to be modified gh api \ --method POST \ /repos/ipfs/kubo/pulls \ - -f title='docs: release v0.17.0' \ - -f head='docs-release-v0.17.0' \ + -f title='docs: release vX.Y.Z' \ + -f head='docs-release-vX.Y.Z' \ -f base='master' \ -f draft=true @@ -158,11 +158,11 @@ Checklist: # retrieve master ref for ipfs/kubo gh api /repos/ipfs/kubo/git/ref/heads/master - # create release-v0.17.0 ref for ipfs/kubo + # create release-vX.Y.Z ref for ipfs/kubo gh api \ --method POST \ /repos/ipfs/kubo/git/refs \ - -f ref='refs/heads/release-v0.17.0' \ + -f ref='refs/heads/release-vX.Y.Z' \ -f sha='a4da8f6cc768c3e2cce9c2677a792b2c237066aa' - [ ] Bump the version in `version.go` in the `master` branch to `vX.(Y+1).0-dev` via a PR ([example](https://github.com/ipfs/kubo/pull/9305)). @@ -171,7 +171,7 @@ Checklist: git checkout -b bump-version # replace the version in version.go - sed -i 's/const CurrentVersionNumber = "0.17.0-dev"/const CurrentVersionNumber = "0.18.0-dev"/g' version.go + sed -i 's/const CurrentVersionNumber = ".*"/const CurrentVersionNumber = "0.18.0-dev"/g' version.go # commit the change git add version.go @@ -188,17 +188,19 @@ Checklist: -f base='master' - [ ] **Stage 2 - Release Candidate** - _if any [non-trivial](docs/releases.md#footnotes) changes need to be included in the release, return to this stage_ + - [ ] If it's not a first RC, add new commits to the `release-vX.Y.Z` branch from `master` using `git cherry-pick -x ...` + - Note: `release-*` branches are protected. You can do all needed updates on a separated branch (e.g. `wip-release-vX.Y.Z`) and when everything is settled push to `release-vX.Y.Z` - [ ] Bump the version in `version.go` in the `release-vX.Y.Z` branch to `vX.Y.Z-rcN`.
# checkout new branch - git checkout -b bump-release-version + git checkout -B bump-release-version # replace the version in version.go - sed -i 's/const CurrentVersionNumber = "0.17.0-dev"/const CurrentVersionNumber = "0.17.0-rc1"/g' version.go + sed -i 's/const CurrentVersionNumber = ".*"/const CurrentVersionNumber = "X.Y.Z-rcN"/g' version.go # commit the change git add version.go - git commit -m "chore: bump version to v0.17.0-rc1" + git commit -m "chore: bump version to vX.Y.Z-rcN" # push the change git push origin bump-release-version @@ -206,19 +208,17 @@ Checklist: # open a PR gh api /repos/ipfs/kubo/pulls \ --method POST \ - -f title='chore: bump version to v0.17.0-rc1' \ + -f title='chore: bump version to vX.Y.Z-rcN' \ -f head='bump-release-version' \ - -f base='release-v0.17.0' + -f base='release-vX.Y.Z'
- - [ ] If applicable, add new commits to the `release-vX.Y.Z` branch from `master` using `git cherry-pick -x ...` - - Note: `release-*` branches are protected. You can do all needed updates on a separated branch (e.g. `wip-release-vX.Y.Z`) and when everything is settled push to `release-vX.Y.Z` - - [ ] Push the `release-vX.Y.Z` branch to GitHub (`git push origin release-vX.Y.Z`) and create a draft PR targetting `release` branch if it doesn't exist yet ([example](https://github.com/ipfs/kubo/pull/9306)). + - [ ] If it's a first RC, create a draft PR targetting `release` branch if it doesn't exist yet ([example](https://github.com/ipfs/kubo/pull/9306)).
# open a PR gh api /repos/ipfs/kubo/pulls \ --method POST \ - -f title='wip: release v0.17.0' \ - -f head='release-v0.17.0' \ + -f title='wip: release vX.Y.Z' \ + -f head='release-vX.Y.Z' \ -f base='release' \ -f draft=true
@@ -228,41 +228,43 @@ Checklist: - [ ] ⚠️ Tag HEAD `release-vX.Y.Z` commit with `vX.Y.Z-rcN` (`git tag -s vX.Y.Z-rcN -m 'Pre-release X.Y.Z-rcn'`)
# create a signed tag - git tag -s v0.17.0-rc1 -m 'Pre-release 0.17.0-rc1' + git tag -s vX.Y.Z-rcN -m 'Pre-release X.Y.Z-rcN'
- - [ ] Run `git show vX.Y.Z-rc1` to ensure the tag is correct. + - [ ] Run `git show vX.Y.Z-rcN` to ensure the tag is correct.
# show the signed tag - git show v0.17.0-rc1 + git show vX.Y.Z-rcN
- - [ ] ⚠️ Push the `vX.Y.Z-rc1` tag to GitHub (`git push origin vX.Y.Z-rc1`; DO NOT USE `git push --tags` because it pushes all your local tags). + - [ ] ⚠️ Push the `vX.Y.Z-rcN` tag to GitHub (`git push origin vX.Y.Z-rcN`; DO NOT USE `git push --tags` because it pushes all your local tags).
# show the signed tag - git push origin v0.17.0-rc1 + git push origin vX.Y.Z-rcN
- [ ] Add artifacts to https://dist.ipfs.tech by making a PR against [ipfs/distributions](https://github.com/ipfs/distributions) - [ ] Clone the `ipfs/distributions` repo locally. - [ ] Create a new branch (`kubo-release-vX.Y.Z-rcn`) from `master`.
# checkout new branch - git checkout -b kubo-release-v0.17.0-rc1 + git checkout -b kubo-release-vX.Y.Z-rcN
- [ ] Run `./dist.sh add-version kubo vX.Y.Z-rcN` to add the new version to the `versions` file ([instructions](https://github.com/ipfs/distributions#usage)). - - `dist.sh` will print _WARNING: not marking pre-release kubo vX.Y.Z-rc1n as the current version._. + - `dist.sh` will print _WARNING: not marking pre-release kubo vX.Y.Z-rcNn as the current version._.
# add new kubo version to dist - ./dist.sh add-version kubo v0.17.0-rc1 + ./dist.sh add-version kubo vX.Y.Z-rcN + git add dists/*/versions + git commit -m "chore: add kubo vX.Y.Z-rcN"
- [ ] Push the `kubo-release-vX.Y.Z-rcn` branch to GitHub and create a PR from that branch ([example](https://github.com/ipfs/distributions/pull/760)).
# push the change - git push origin kubo-release-v0.17.0-rc1 + git push origin kubo-release-vX.Y.Z-rcN # open a PR gh api /repos/ipfs/distributions/pulls \ --method POST \ - -f title='chore: add kubo v0.17.0-rc1' \ - -f head='kubo-release-v0.17.0-rc1' \ + -f title='chore: add kubo vX.Y.Z-rcN' \ + -f head='kubo-release-vX.Y.Z-rcN' \ -f base='master'
- [ ] Ask for a review from the release reviewer. @@ -272,15 +274,15 @@ Checklist: - `master` build will publish the artifacts to https://dist.ipfs.io in around 30 minutes
# get pull id - id=$(gh api --method GET /repos/ipfs/distributions/pulls -f head='kubo-release-v0.17.0-rc1' --jq '.[0].id') + id=$(gh api --method GET /repos/ipfs/distributions/pulls -f head='kubo-release-vX.Y.Z-rcN' --jq '.[0].node_id') # enable automerge - gh api graphql -f pull="${id}" -f query='mutation($pull: ID!) { enablePullRequestAutoMerge(input: {pullRequestId: $pull, mergeMethod: SQUASH}) {} }' + gh api graphql -f pull="${id}" -f query='mutation($pull: ID!) { enablePullRequestAutoMerge(input: {pullRequestId: $pull, mergeMethod: SQUASH}) { pullRequest { autoMergeRequest { enabledAtenabledBy { login } } } } }'
- [ ] Ensure that the artifacts are available at https://dist.ipfs.io
# check if RC is available - curl --retry 5 --no-progress-meter https://dist.ipfs.tech/kubo/versions | grep -q v0.17.0-rc1 + curl --retry 5 --no-progress-meter https://dist.ipfs.tech/kubo/versions | grep -q vX.Y.Z-rcN echo $?
- [ ] Publish the RC to [the NPM package](https://www.npmjs.com/package/go-ipfs?activeTab=versions) by running https://github.com/ipfs/npm-go-ipfs/actions/workflows/main.yml (it happens automatically but it is safe to speed up the process and kick of a run manually) @@ -304,10 +306,10 @@ Checklist: # check logs for version gh api /repos/ipfs/npm-go-ipfs/actions/jobs/9499319520/logs \ - --method GET | grep -q '0.17.0-rc1' + --method GET | grep -q 'X.Y.Z-rcN' echo $? - - [ ] Cut a pre-release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/v0.16.0-rc1)) + - [ ] Cut a pre-release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/v0.16.0-rcN)) - Use `vX.Y.Z-rcN` as the tag. - Link to the release issue in the description. - Link to the relevant [changelog](https://github.com/ipfs/kubo/blob/master/docs/changelogs/) in the description. @@ -316,16 +318,16 @@ Checklist: # create a pre-release body='See the related issue: https://github.com/ipfs/kubo/issues/9319 - And the draft changelog: [docs/changelogs/v0.17.md](https://github.com/ipfs/kubo/blob/release-v0.17.0/docs/changelogs/v0.17.md)' + And the draft changelog: [docs/changelogs/v0.17.md](https://github.com/ipfs/kubo/blob/release-vX.Y.Z/docs/changelogs/v0.17.md)' gh api /repos/ipfs/kubo/releases \ --method POST \ - -f tag_name='v0.17.0-rc1' \ - -f name='v0.17.0-rc1' \ + -f tag_name='vX.Y.Z-rcN' \ + -f name='vX.Y.Z-rcN' \ -f body="${body}" \ -F draft=false \ -F prerelease=true \ -F generate_release_notes=false \ - -F make_latest=false + -f make_latest=false - [ ] Synchronize release artifacts by running [sync-release-assets](https://github.com/ipfs/kubo/actions/workflows/sync-release-assets.yml) workflow.
@@ -335,7 +337,7 @@ Checklist: -f ref='master'
- [ ] Announce the RC - - [ ] Create a new post on [IPFS Discourse](https://discuss.ipfs.tech). ([example](https://discuss.ipfs.tech/t/kubo-v0-16-0-rc1-release-candidate-is-out/15248)) + - [ ] Create a new post on [IPFS Discourse](https://discuss.ipfs.tech). ([example](https://discuss.ipfs.tech/t/kubo-v0-16-0-rcN-release-candidate-is-out/15248)) - Use `Kubo vX.Y.Z-rcn Release Candidate is out!` as the title. - Use `kubo` and `go-ipfs` as topics. - Repeat the title as a heading (`##`) in the description. @@ -364,28 +366,28 @@ Checklist: - [ ] Ensure CI tests pass
# checkout new branch - git checkout -b kubo-release-v0.17.0 + git checkout -b kubo-release-vX.Y.Z # replace the go-ipfs version in package.json - sed -i 's/"go-ipfs": ".*"/"go-ipfs": "0.17.0-rc1"/' package.json + sed -i 's/"go-ipfs": ".*"/"go-ipfs": "X.Y.Z-rcN"/' package.json # update package-lock.json npm install # commit the change git add package.json package-lock.json - git commit -m "chore: bump kubo version to v0.17.0-rc1" + git commit -m "chore: bump kubo version to vX.Y.Z-rcN" # push the change - git push origin kubo-release-v0.17.0 + git push origin kubo-release-vX.Y.Z # open a PR gh api /repos/ipfs/ipfs-desktop/pulls \ --method POST \ - -f title='chore: bump kubo version to v0.17.0-rc1' \ - -f head='kubo-release-v0.17.0' \ + -f title='chore: bump kubo version to vX.Y.Z-rcN' \ + -f head='kubo-release-vX.Y.Z' \ -f base='main' \ - -f title='chore: bump kubo version to v0.17.0' \ + -f title='chore: bump kubo version to vX.Y.Z' \ -F draft=true
- [ ] [IPFS Companion](https://github.com/ipfs-shipyard/ipfs-companion) @@ -395,7 +397,7 @@ Checklist: - [ ] Install IPFS Companion from [vendor-specific store](https://github.com/ipfs/ipfs-companion/#readme). - [ ] Check that the comunication between Kubo daemon and IPFS companion is working properly checking if the number of connected peers changes.
- curl --retry 5 --no-progress-meter --output kubo.tar.gz https://dist.ipfs.tech/kubo/v0.17.0-rc1/kubo_v0.17.0-rc1_darwin-arm64.tar.gz + curl --retry 5 --no-progress-meter --output kubo.tar.gz https://dist.ipfs.tech/kubo/vX.Y.Z-rcN/kubo_vX.Y.Z-rcN_darwin-arm64.tar.gz tar -xzvf kubo.tar.gz export IPFS_PATH=$(mktemp -d) ./kubo/ipfs init @@ -403,7 +405,28 @@ Checklist:
- [ ] **Stage 5 - Release** - _ONLY FOR FINAL RELEASE_ - [ ] Prepare the `release` branch. - - [ ] Bump the version in `version.go` in the `release-vX.Y.Z` branch to `vX.Y.Z`. + - [ ] Bump the version in `version.go` in the `release-vX.Y.Z` branch to `X.Y.Z`. +
+ # checkout new branch + git checkout -b bump-version-vX.Y.Z + + # replace the version in version.go + sed -i 's/const CurrentVersionNumber = ".*"/const CurrentVersionNumber = "X.Y.Z"/g' version.go + + # commit the change + git add version.go + git commit -m "chore: bump version to vX.Y.Z" + + # push the change + git push origin bump-version-vX.Y.Z + + # open a PR + gh api /repos/ipfs/kubo/pulls \ + --method POST \ + -f title='chore: bump version to vX.Y.Z' \ + -f head='bump-version-vX.Y.Z' \ + -f base='release-vX.Y.Z' +
- [ ] Update the [docs/changelogs/vX.Y.md](docs/changelogs) with the new commits and contributors. - [ ] Run `./bin/mkreleaselog` twice to generate the changelog and copy the output. - The first run of the script might be poluted with `git clone` output. @@ -418,31 +441,93 @@ Checklist: - Do not delete the `release-vX.Y.Z` branch. - [ ] Checkout the `release` branch locally. - Remember to pull the latest changes. +
+ git checkout release + git pull +
- [ ] Create a signed tag for the release. - [ ] This is a dangerous operation, as it is difficult to reverse due to Go modules and automated Docker image publishing. Remember to verify the commands you intend to run for items marked with ⚠️ with the release reviewer. - [ ] ⚠️ Tag HEAD `release` commit with `vX.Y.Z` (`git tag -s vX.Y.Z -m 'Release X.Y.Z'`) +
+ # create a signed tag + git tag -s vX.Y.Z -m 'Release X.Y.Z' +
- [ ] Run `git show vX.Y.Z` to ensure the tag is correct. +
+ # show the signed tag + git show vX.Y.Z +
- [ ] ⚠️ Push the `vX.Y.Z` tag to GitHub (`git push origin vX.Y.Z`; DO NOT USE `git push --tags` because it pushes all your local tags). +
+ # show the signed tag + git push origin vX.Y.Z +
- [ ] Publish the release. - [ ] Wait for [Publish docker image](https://github.com/ipfs/kubo/actions/workflows/docker-image.yml) workflow run initiated by the tag push to finish. - [ ] Add artifacts to https://dist.ipfs.tech by making a PR against [ipfs/distributions](https://github.com/ipfs/distributions) - [ ] Clone the `ipfs/distributions` repo locally. - [ ] Create a new branch (`kubo-release-vX.Y.Z`) from `master`. +
+ # create a new branch + git checkout -b kubo-release-vX.Y.Z +
- [ ] Run `./dist.sh add-version kubo vX.Y.Z` to add the new version to the `versions` file ([instructions](https://github.com/ipfs/distributions#usage)). +
+ # add new kubo version to dist + ./dist.sh add-version kubo vX.Y.Z + git add dists/*/versions + git commit -m "chore: add kubo vX.Y.Z" +
- [ ] Push the `kubo-release-vX.Y.Z` branch to GitHub and create a PR from that branch ([example](https://github.com/ipfs/distributions/pull/768)). +
+ # push the change + git push origin kubo-release-vX.Y.Z + + # open a PR + gh api /repos/ipfs/distributions/pulls \ + --method POST \ + -f title='chore: add kubo vX.Y.Z' \ + -f head='kubo-release-vX.Y.Z' \ + -f base='master' +
- [ ] Ask for a review from the release reviewer. - [ ] Enable auto-merge for the PR. - PR build will build the artifacts and generate a diff in around 30 minutes - PR will be merged automatically once the diff is approved - `master` build will publish the artifacts to https://dist.ipfs.io in around 30 minutes +
+ # get pull id + id=$(gh api --method GET /repos/ipfs/distributions/pulls -f head='kubo-release-vX.Y.Z' --jq '.[0].node_id') + + # enable automerge + gh api graphql -f pull="${id}" -f query='mutation($pull: ID!) { enablePullRequestAutoMerge(input: {pullRequestId: $pull, mergeMethod: SQUASH}) { pullRequest { autoMergeRequest { enabledBy { login } } } } }' +
- [ ] Ensure that the artifacts are available at https://dist.ipfs.io - [ ] Publish the release to [the NPM package](https://www.npmjs.com/package/go-ipfs?activeTab=versions) by running https://github.com/ipfs/npm-go-ipfs/actions/workflows/main.yml (it happens automatically but it is safe to speed up the process and kick of a run manually) - [ ] Cut the release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/v0.16.0)) - Use `vX.Y.Z` as the tag. - - Link to the release issue in the description. - Copy the relevant [changelog](https://github.com/ipfs/kubo/blob/release/docs/changelogs/) into the release description. - - Keep the release notes as trim as possible (e.g. remove top headers where possible, [example](https://github.com/ipfs/kubo/releases/tag/v0.15.0)) + - Keep the release notes as trim as possible (e.g. remove top headers where possible, [example](https://github.com/ipfs/kubo/releases/tag/v0.15.0)) +
+ # create the release + body="$(curl --retry 5 --no-progress-meter https://raw.githubusercontent.com/ipfs/kubo/release-vX.Y.Z/docs/changelogs/v0.17.md)" + gh api /repos/ipfs/kubo/releases \ + --method POST \ + -f tag_name='vX.Y.Z' \ + -f name='vX.Y.Z' \ + -f body="${body}" \ + -F draft=false \ + -F prerelease=false \ + -F generate_release_notes=false \ + -f make_latest=true +
- [ ] Synchronize release artifacts by running [sync-release-assets](https://github.com/ipfs/kubo/actions/workflows/sync-release-assets.yml) workflow. +
+ # dispatch workflow + gh api /repos/ipfs/kubo/actions/workflows/sync-release-assets.yml/dispatches \ + --method POST \ + -f ref='master' +
- [ ] TODO: https://github.com/protocol/bifrost-infra/issues/2184#issuecomment-1315279257 - [ ] Announce the release - [ ] Add a link to the release to this release issue as a comment. @@ -462,11 +547,19 @@ Checklist: - [ ] Update the draft PR created for [IPFS Desktop](https://github.com/ipfs-shipyard/ipfs-desktop) to use the new release and mark it as ready for review. - [ ] Update docs - [ ] Run https://github.com/ipfs/ipfs-docs/actions/workflows/update-on-new-ipfs-tag.yml to generate a PR to the docs repo +
+ # dispatch workflow + gh api /repos/ipfs/ipfs-docs/actions/workflows/update-on-new-ipfs-tag.yml/dispatches \ + --method POST \ + -f ref='main' +
- [ ] Merge the auto-created PR in https://github.com/ipfs/ipfs-docs/pulls ([example](https://github.com/ipfs/ipfs-docs/pull/1263)) - - [ ] Get the blog post created and shared + - [ ] Get the blog post created - [ ] Submit a request for blog post creation using [the form](https://airtable.com/shrNH8YWole1xc70I). - - Notify marketing in #shared-pl-marketing-requests about the blog entry request (since the form tends to go to spam; [example]([example](https://filecoinproject.slack.com/archives/C018EJ8LWH1/p1664885305374909))). - - Don't mark this as done until the blog entry is live. + - Title: Just released: Kubo X.Y.Z! + - Link type: Release notes + - URL: https://github.com/ipfs/kubo/releases/tag/vX.Y.Z + - [ ] The post is live on https://blog.ipfs.io - [ ] Share the blog post - [ ] Twitter (request in Filecoin Slack channel #shared-pl-marketing-requests; [example](https://filecoinproject.slack.com/archives/C018EJ8LWH1/p1664903524843269?thread_ts=1664885305.374909&cid=C018EJ8LWH1)) - [ ] [Reddit](https://reddit.com/r/ipfs) From a1a7c987b02fa39c549dc0e8b5816370fcba326e Mon Sep 17 00:00:00 2001 From: galargh Date: Mon, 5 Dec 2022 09:50:10 +0100 Subject: [PATCH 07/12] docs: update examples in release issue teamplate --- docs/RELEASE_ISSUE_TEMPLATE.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index 3ffce655e09..8802bd46a19 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -309,7 +309,7 @@ Checklist: --method GET | grep -q 'X.Y.Z-rcN' echo $? - - [ ] Cut a pre-release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/v0.16.0-rcN)) + - [ ] Cut a pre-release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/vX.Y.Z-rcN)) - Use `vX.Y.Z-rcN` as the tag. - Link to the release issue in the description. - Link to the relevant [changelog](https://github.com/ipfs/kubo/blob/master/docs/changelogs/) in the description. @@ -318,7 +318,7 @@ Checklist: # create a pre-release body='See the related issue: https://github.com/ipfs/kubo/issues/9319 - And the draft changelog: [docs/changelogs/v0.17.md](https://github.com/ipfs/kubo/blob/release-vX.Y.Z/docs/changelogs/v0.17.md)' + And the draft changelog: [docs/changelogs/vX.Y.md](https://github.com/ipfs/kubo/blob/release-vX.Y.Z/docs/changelogs/vX.Y.md)' gh api /repos/ipfs/kubo/releases \ --method POST \ -f tag_name='vX.Y.Z-rcN' \ @@ -504,13 +504,13 @@ Checklist: - [ ] Ensure that the artifacts are available at https://dist.ipfs.io - [ ] Publish the release to [the NPM package](https://www.npmjs.com/package/go-ipfs?activeTab=versions) by running https://github.com/ipfs/npm-go-ipfs/actions/workflows/main.yml (it happens automatically but it is safe to speed up the process and kick of a run manually) - - [ ] Cut the release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/v0.16.0)) + - [ ] Cut the release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/v0.17.0)) - Use `vX.Y.Z` as the tag. - Copy the relevant [changelog](https://github.com/ipfs/kubo/blob/release/docs/changelogs/) into the release description. - - Keep the release notes as trim as possible (e.g. remove top headers where possible, [example](https://github.com/ipfs/kubo/releases/tag/v0.15.0)) + - Keep the release notes as trim as possible (e.g. remove top headers where possible, [example](https://github.com/ipfs/kubo/releases/tag/v0.17.0))
# create the release - body="$(curl --retry 5 --no-progress-meter https://raw.githubusercontent.com/ipfs/kubo/release-vX.Y.Z/docs/changelogs/v0.17.md)" + body="$(curl --retry 5 --no-progress-meter https://raw.githubusercontent.com/ipfs/kubo/release-vX.Y.Z/docs/changelogs/vX.Y.md)" gh api /repos/ipfs/kubo/releases \ --method POST \ -f tag_name='vX.Y.Z' \ @@ -542,7 +542,7 @@ Checklist: - [ ] IPFS Discord #ipfs-chatter - [ ] FIL Slack #ipfs-chatter - [ ] Matrix - - [ ] Add a link from release notes to Discuss post (like we did here: https://github.com/ipfs/kubo/releases/tag/v0.15.0) + - [ ] Add a link from release notes to Discuss post (like we did here: https://github.com/ipfs/kubo/releases/tag/v0.17.0) - [ ] Update the draft PR created for [interop](https://github.com/ipfs/interop) to use the new release and mark it as ready for review. - [ ] Update the draft PR created for [IPFS Desktop](https://github.com/ipfs-shipyard/ipfs-desktop) to use the new release and mark it as ready for review. - [ ] Update docs @@ -560,9 +560,9 @@ Checklist: - Link type: Release notes - URL: https://github.com/ipfs/kubo/releases/tag/vX.Y.Z - [ ] The post is live on https://blog.ipfs.io - - [ ] Share the blog post - - [ ] Twitter (request in Filecoin Slack channel #shared-pl-marketing-requests; [example](https://filecoinproject.slack.com/archives/C018EJ8LWH1/p1664903524843269?thread_ts=1664885305.374909&cid=C018EJ8LWH1)) - - [ ] [Reddit](https://reddit.com/r/ipfs) + - [ ] Share the link to the GitHub release + - [ ] Twitter (request in Filecoin Slack channel #shared-pl-marketing-requests; [example](https://filecoinproject.slack.com/archives/C018EJ8LWH1/p1664903524843269?thread_ts=1664885305.374909&cid=C018EJ8LWH1)) + - [ ] [Reddit](https://reddit.com/r/ipfs) - [ ] **Stage 6 - Post-Release** - [ ] Merge the `release` branch back into `master`, ignoring the changes to `version.go` (keep the `-dev` version from master). - [ ] Create an issue using this release issue template for the _next_ release. From fa21445d6762ae4f80700bb24a31cd6adffc4cc4 Mon Sep 17 00:00:00 2001 From: galargh Date: Mon, 5 Dec 2022 09:50:41 +0100 Subject: [PATCH 08/12] docs: update mkreleaselog output --- bin/mkreleaselog | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/mkreleaselog b/bin/mkreleaselog index a60125cb2f4..1b31854a754 100755 --- a/bin/mkreleaselog +++ b/bin/mkreleaselog @@ -261,6 +261,11 @@ recursive_release_log() { printf -- "Generating Changelog for %s %s..%s\n" "$module" "$start" "$end" >&2 + echo "### Changelog" + echo + echo "
Full Changelog" + echo + printf -- "- %s:\n" "$module" release_log "$module" "$start" "$end" | indent @@ -286,7 +291,9 @@ recursive_release_log() { done echo - echo "Contributors" + echo "
" + echo + echo "### Contributors" echo echo "| Contributor | Commits | Lines ± | Files Changed |" From 345c58ff7a4b286813b173628a9eb46fb52ab138 Mon Sep 17 00:00:00 2001 From: galargh Date: Mon, 5 Dec 2022 09:52:43 +0100 Subject: [PATCH 09/12] docs: ensure the changelogs are correctly linked --- docs/RELEASE_ISSUE_TEMPLATE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index 8802bd46a19..a222f452470 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -94,6 +94,7 @@ Checklist: - [ ] Prepare changelog proposal in [docs/changelogs/vX.Y.md](https://github.com/ipfs/kubo/blob/master/docs/changelogs/). - Skip filling out the `### Changelog` section (the one where which lists all the commits and contributors) for now. We will populate it after the release branch is cut. - PR link: + - [ ] Ensure the new changelog is linked in the [CHANGELOG.md](CHANGELOG.md) file. - [ ] Install ZSH ([instructions](https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH#install-and-set-up-zsh-as-default)). It is needed by the changelog creation script. - [ ] Ensure you have `kubo` checked out under `$(go env GOPATH)/src/github.com/ipfs/kubo`. This is required by the changelog creation script. - If you want your clone to live in a different location, you can symlink it to the expected location by running `mkdir -p $(go env GOPATH)/src/github.com/ipfs && ln -s $(pwd) $(go env GOPATH)/src/github.com/ipfs/kubo`. From 4d1d0b7eedd65506ddf95b971bf45f2d03ac4cbe Mon Sep 17 00:00:00 2001 From: galargh Date: Mon, 5 Dec 2022 09:55:40 +0100 Subject: [PATCH 10/12] docs: remove raw release issue template automation notes --- docs/RELEASE_ISSUE_TEMPLATE.md | 360 --------------------------------- 1 file changed, 360 deletions(-) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index a222f452470..992ec805904 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -45,46 +45,9 @@ Checklist: - [ ] Spell out all that we want updated - gateways, the bootstraper and the cluster/preload nodes - [ ] Mention @protocol/bifrost-team in the issue and let them know the expected date of the release - Issue link: -
- # create new issue in protocol/bifrost-infra - gh api \ - --method POST \ - --raw-field "title=Rollout Kubo vX.Y.Z-RCN" \ - --raw-field "body=## What should be updated - - - [ ] Gateways - - [ ] Bootstrapper - - [ ] Cluster/Preload nodes - - ## When - - YYYY-MM-DD" \ - repos/protocol/bifrost-infra/issues -
- [ ] Ensure that the `What's left for release` section has all the checkboxes checked. If that's not the case, discuss the open items with Kubo maintainers and update the release schedule accordingly. - [ ] Create `docs-release-vX.Y.Z` branch, open a draft PR and keep updating `docs/RELEASE_ISSUE_TEMPLATE.md` on that branch as you go. - [ ] Link it in the "Meta" section above. -
- # retrieve master ref for ipfs/kubo - gh api /repos/ipfs/kubo/git/ref/heads/master - - # create docs-release-vX.Y.Z ref for ipfs/kubo - gh api \ - --method POST \ - /repos/ipfs/kubo/git/refs \ - -f ref='refs/heads/docs-release-vX.Y.Z' \ - -f sha='254d81a9d5595c3e637c7573d56125836d5f5055' - - # create draft PR from docs-release-vX.Y.Z to master for ipfs/kubo - # requires docs-release-vX.Y.Z to be modified - gh api \ - --method POST \ - /repos/ipfs/kubo/pulls \ - -f title='docs: release vX.Y.Z' \ - -f head='docs-release-vX.Y.Z' \ - -f base='master' \ - -f draft=true -
- [ ] Ensure you have a [GPG key generated](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key) and [added to your GitHub account](https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account). This will enable you to created signed tags. - [ ] Ensure you have [admin access](https://discuss.ipfs.tech/g/admins) to [IPFS Discourse](https://discuss.ipfs.tech/). Admin access is required to globally pin posts and create banners. @2color might be able to assist you. - [ ] Access to [#bifrost](https://filecoinproject.slack.com/archives/C03MMMF606T) channel in FIL Slack might come in handy. Ask the release reviewer to invite you over. @@ -102,241 +65,41 @@ Checklist: - [ ] **Stage 1 - Initial Preparations** - [ ] Upgrade to the latest patch release of Go that CircleCI has published (currently used version: `1.19.1`) - [ ] See the list here: https://hub.docker.com/r/cimg/go/tags -
- # retrieve the latest version of cimg/go available - curl -s 'https://hub.docker.com/v2/repositories/cimg/go/tags' | jq -r '.results | map(.name) | map(select(. | test("^[0-9]+\\.[0-9]+\\.[0-9]+$"))) | .[0]' -
- [ ] [ipfs/distributions](https://github.com/ipfs/distributions): bump [this version](https://github.com/ipfs/distributions/blob/master/.tool-versions#L2) -
- # checkout new branch - git checkout -b bump-go-version - - # replace the cimg/go version in .tool-versions in ipfs/distributions - sed -i 's/golang [0-9]\+\.[0-9]\+\.[0-9]\+/golang 1.19.3/g' .tool-versions - - # commit the change - git add .tool-versions - git commit -m "chore: bump go version to 1.19.3" - - # push the change - git push origin bump-go-version - - # open a PR - gh api /repos/ipfs/distributions/pulls \ - --method POST \ - -f title='chore: bump go version to 1.19.3' \ - -f head='bump-go-version' \ - -f base='master' -
- [ ] [ipfs/kubo](https://github.com/ipfs/kubo): [example PR](https://github.com/ipfs/kubo/pull/8599) -
- # checkout new branch - git checkout -b bump-go-version - - # replace the cimg/go version in .circleci/main.yml in ipfs/kubo - sed -i 's/cimg\/go:[0-9]\+\.[0-9]\+\.[0-9]\+/cimg\/go:1.19.3/g' .circleci/main.yml - - # replace golang version in Dockerfile - sed -i 's/golang:[0-9]\+\.[0-9]\+\.[0-9]\+/golang:1.19.3/g' Dockerfile - - # commit the change - git add .circleci/main.yml Dockerfile - git commit -m "chore: bump go version to 1.19.3" - - # push the change - git push origin bump-go-version - - # open a PR - gh api /repos/ipfs/kubo/pulls \ - --method POST \ - -f title='chore: bump go version to 1.19.3' \ - -f head='bump-go-version' \ - -f base='master' -
- [ ] [ipfs/ipfs-docs](https://github.com/ipfs/ipfs-docs): [example PR](https://github.com/ipfs/ipfs-docs/pull/1298) - only if the major version changed - [ ] Fork a new branch (`release-vX.Y.Z`) from `master`. -
- # retrieve master ref for ipfs/kubo - gh api /repos/ipfs/kubo/git/ref/heads/master - - # create release-vX.Y.Z ref for ipfs/kubo - gh api \ - --method POST \ - /repos/ipfs/kubo/git/refs \ - -f ref='refs/heads/release-vX.Y.Z' \ - -f sha='a4da8f6cc768c3e2cce9c2677a792b2c237066aa' -
- [ ] Bump the version in `version.go` in the `master` branch to `vX.(Y+1).0-dev` via a PR ([example](https://github.com/ipfs/kubo/pull/9305)). -
- # checkout new branch - git checkout -b bump-version - - # replace the version in version.go - sed -i 's/const CurrentVersionNumber = ".*"/const CurrentVersionNumber = "0.18.0-dev"/g' version.go - - # commit the change - git add version.go - git commit -m "chore: bump version to v0.18.0-dev" - - # push the change - git push origin bump-version - - # open a PR - gh api /repos/ipfs/kubo/pulls \ - --method POST \ - -f title='chore: bump version to v0.18.0-dev' \ - -f head='bump-version' \ - -f base='master' -
- [ ] **Stage 2 - Release Candidate** - _if any [non-trivial](docs/releases.md#footnotes) changes need to be included in the release, return to this stage_ - [ ] If it's not a first RC, add new commits to the `release-vX.Y.Z` branch from `master` using `git cherry-pick -x ...` - Note: `release-*` branches are protected. You can do all needed updates on a separated branch (e.g. `wip-release-vX.Y.Z`) and when everything is settled push to `release-vX.Y.Z` - [ ] Bump the version in `version.go` in the `release-vX.Y.Z` branch to `vX.Y.Z-rcN`. -
- # checkout new branch - git checkout -B bump-release-version - - # replace the version in version.go - sed -i 's/const CurrentVersionNumber = ".*"/const CurrentVersionNumber = "X.Y.Z-rcN"/g' version.go - - # commit the change - git add version.go - git commit -m "chore: bump version to vX.Y.Z-rcN" - - # push the change - git push origin bump-release-version - - # open a PR - gh api /repos/ipfs/kubo/pulls \ - --method POST \ - -f title='chore: bump version to vX.Y.Z-rcN' \ - -f head='bump-release-version' \ - -f base='release-vX.Y.Z' -
- [ ] If it's a first RC, create a draft PR targetting `release` branch if it doesn't exist yet ([example](https://github.com/ipfs/kubo/pull/9306)). -
- # open a PR - gh api /repos/ipfs/kubo/pulls \ - --method POST \ - -f title='wip: release vX.Y.Z' \ - -f head='release-vX.Y.Z' \ - -f base='release' \ - -f draft=true -
- [ ] Wait for CI to run and complete PR checks. All checks should pass. - [ ] Create a signed tag for the release candidate. - [ ] This is a dangerous operation, as it is difficult to reverse due to Go modules and automated Docker image publishing. Remember to verify the commands you intend to run for items marked with ⚠️ with the release reviewer. - [ ] ⚠️ Tag HEAD `release-vX.Y.Z` commit with `vX.Y.Z-rcN` (`git tag -s vX.Y.Z-rcN -m 'Pre-release X.Y.Z-rcn'`) -
- # create a signed tag - git tag -s vX.Y.Z-rcN -m 'Pre-release X.Y.Z-rcN' -
- [ ] Run `git show vX.Y.Z-rcN` to ensure the tag is correct. -
- # show the signed tag - git show vX.Y.Z-rcN -
- [ ] ⚠️ Push the `vX.Y.Z-rcN` tag to GitHub (`git push origin vX.Y.Z-rcN`; DO NOT USE `git push --tags` because it pushes all your local tags). -
- # show the signed tag - git push origin vX.Y.Z-rcN -
- [ ] Add artifacts to https://dist.ipfs.tech by making a PR against [ipfs/distributions](https://github.com/ipfs/distributions) - [ ] Clone the `ipfs/distributions` repo locally. - [ ] Create a new branch (`kubo-release-vX.Y.Z-rcn`) from `master`. -
- # checkout new branch - git checkout -b kubo-release-vX.Y.Z-rcN -
- [ ] Run `./dist.sh add-version kubo vX.Y.Z-rcN` to add the new version to the `versions` file ([instructions](https://github.com/ipfs/distributions#usage)). - `dist.sh` will print _WARNING: not marking pre-release kubo vX.Y.Z-rcNn as the current version._. -
- # add new kubo version to dist - ./dist.sh add-version kubo vX.Y.Z-rcN - git add dists/*/versions - git commit -m "chore: add kubo vX.Y.Z-rcN" -
- [ ] Push the `kubo-release-vX.Y.Z-rcn` branch to GitHub and create a PR from that branch ([example](https://github.com/ipfs/distributions/pull/760)). -
- # push the change - git push origin kubo-release-vX.Y.Z-rcN - - # open a PR - gh api /repos/ipfs/distributions/pulls \ - --method POST \ - -f title='chore: add kubo vX.Y.Z-rcN' \ - -f head='kubo-release-vX.Y.Z-rcN' \ - -f base='master' -
- [ ] Ask for a review from the release reviewer. - [ ] Enable auto-merge for the PR. - PR build will build the artifacts and generate a diff in around 30 minutes - PR will be merged automatically once the diff is approved - `master` build will publish the artifacts to https://dist.ipfs.io in around 30 minutes -
- # get pull id - id=$(gh api --method GET /repos/ipfs/distributions/pulls -f head='kubo-release-vX.Y.Z-rcN' --jq '.[0].node_id') - - # enable automerge - gh api graphql -f pull="${id}" -f query='mutation($pull: ID!) { enablePullRequestAutoMerge(input: {pullRequestId: $pull, mergeMethod: SQUASH}) { pullRequest { autoMergeRequest { enabledAtenabledBy { login } } } } }' -
- [ ] Ensure that the artifacts are available at https://dist.ipfs.io -
- # check if RC is available - curl --retry 5 --no-progress-meter https://dist.ipfs.tech/kubo/versions | grep -q vX.Y.Z-rcN - echo $? -
- [ ] Publish the RC to [the NPM package](https://www.npmjs.com/package/go-ipfs?activeTab=versions) by running https://github.com/ipfs/npm-go-ipfs/actions/workflows/main.yml (it happens automatically but it is safe to speed up the process and kick of a run manually) -
- # dispatch workflow - gh api /repos/ipfs/npm-go-ipfs/actions/workflows/main.yml/dispatches \ - --method POST \ - -f ref='master' - - # get workflow run - gh api /repos/ipfs/npm-go-ipfs/actions/workflows/main.yml/runs \ - --method GET \ - -f per_page='1' \ - --jq '.workflow_runs[0]' - - # get workflow job - gh api /repos/ipfs/npm-go-ipfs/actions/runs/3470515021/jobs \ - --method GET \ - -f per_page='1' \ - --jq '.jobs[0]' - - # check logs for version - gh api /repos/ipfs/npm-go-ipfs/actions/jobs/9499319520/logs \ - --method GET | grep -q 'X.Y.Z-rcN' - echo $? -
- [ ] Cut a pre-release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/vX.Y.Z-rcN)) - Use `vX.Y.Z-rcN` as the tag. - Link to the release issue in the description. - Link to the relevant [changelog](https://github.com/ipfs/kubo/blob/master/docs/changelogs/) in the description. - Check `This is a pre-release`. -
- # create a pre-release - body='See the related issue: https://github.com/ipfs/kubo/issues/9319 - - And the draft changelog: [docs/changelogs/vX.Y.md](https://github.com/ipfs/kubo/blob/release-vX.Y.Z/docs/changelogs/vX.Y.md)' - gh api /repos/ipfs/kubo/releases \ - --method POST \ - -f tag_name='vX.Y.Z-rcN' \ - -f name='vX.Y.Z-rcN' \ - -f body="${body}" \ - -F draft=false \ - -F prerelease=true \ - -F generate_release_notes=false \ - -f make_latest=false -
- [ ] Synchronize release artifacts by running [sync-release-assets](https://github.com/ipfs/kubo/actions/workflows/sync-release-assets.yml) workflow. -
- # dispatch workflow - gh api /repos/ipfs/kubo/actions/workflows/sync-release-assets.yml/dispatches \ - --method POST \ - -f ref='master' -
- [ ] Announce the RC - [ ] Create a new post on [IPFS Discourse](https://discuss.ipfs.tech). ([example](https://discuss.ipfs.tech/t/kubo-v0-16-0-rcN-release-candidate-is-out/15248)) - Use `Kubo vX.Y.Z-rcn Release Candidate is out!` as the title. @@ -365,69 +128,15 @@ Checklist: - [ ] Push to a branch ([example](https://github.com/ipfs/ipfs-desktop/pull/1826/commits/b0a23db31ce942b46d95965ee6fe770fb24d6bde)) - [ ] Open a draft PR to track through the final release ([example](https://github.com/ipfs/ipfs-desktop/pull/1826)) - [ ] Ensure CI tests pass -
- # checkout new branch - git checkout -b kubo-release-vX.Y.Z - - # replace the go-ipfs version in package.json - sed -i 's/"go-ipfs": ".*"/"go-ipfs": "X.Y.Z-rcN"/' package.json - - # update package-lock.json - npm install - - # commit the change - git add package.json package-lock.json - git commit -m "chore: bump kubo version to vX.Y.Z-rcN" - - # push the change - git push origin kubo-release-vX.Y.Z - - # open a PR - gh api /repos/ipfs/ipfs-desktop/pulls \ - --method POST \ - -f title='chore: bump kubo version to vX.Y.Z-rcN' \ - -f head='kubo-release-vX.Y.Z' \ - -f base='main' \ - -f title='chore: bump kubo version to vX.Y.Z' \ - -F draft=true -
- [ ] [IPFS Companion](https://github.com/ipfs-shipyard/ipfs-companion) - [ ] Start kubo daemon of the version to release. - [ ] Start a fresh chromium or chrome instance using `chromium --user-data-dir=$(mktemp -d)` (macos `/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=$(mktemp -d)`) - [ ] Start a fresh firefox instance using `firefox --profile $(mktemp -d)` (macos `/Applications/Firefox.app/Contents/MacOS/firefox --profile $(mktemp -d)`) - [ ] Install IPFS Companion from [vendor-specific store](https://github.com/ipfs/ipfs-companion/#readme). - [ ] Check that the comunication between Kubo daemon and IPFS companion is working properly checking if the number of connected peers changes. -
- curl --retry 5 --no-progress-meter --output kubo.tar.gz https://dist.ipfs.tech/kubo/vX.Y.Z-rcN/kubo_vX.Y.Z-rcN_darwin-arm64.tar.gz - tar -xzvf kubo.tar.gz - export IPFS_PATH=$(mktemp -d) - ./kubo/ipfs init - ./kubo/ipfs daemon & -
- [ ] **Stage 5 - Release** - _ONLY FOR FINAL RELEASE_ - [ ] Prepare the `release` branch. - [ ] Bump the version in `version.go` in the `release-vX.Y.Z` branch to `X.Y.Z`. -
- # checkout new branch - git checkout -b bump-version-vX.Y.Z - - # replace the version in version.go - sed -i 's/const CurrentVersionNumber = ".*"/const CurrentVersionNumber = "X.Y.Z"/g' version.go - - # commit the change - git add version.go - git commit -m "chore: bump version to vX.Y.Z" - - # push the change - git push origin bump-version-vX.Y.Z - - # open a PR - gh api /repos/ipfs/kubo/pulls \ - --method POST \ - -f title='chore: bump version to vX.Y.Z' \ - -f head='bump-version-vX.Y.Z' \ - -f base='release-vX.Y.Z' -
- [ ] Update the [docs/changelogs/vX.Y.md](docs/changelogs) with the new commits and contributors. - [ ] Run `./bin/mkreleaselog` twice to generate the changelog and copy the output. - The first run of the script might be poluted with `git clone` output. @@ -442,93 +151,30 @@ Checklist: - Do not delete the `release-vX.Y.Z` branch. - [ ] Checkout the `release` branch locally. - Remember to pull the latest changes. -
- git checkout release - git pull -
- [ ] Create a signed tag for the release. - [ ] This is a dangerous operation, as it is difficult to reverse due to Go modules and automated Docker image publishing. Remember to verify the commands you intend to run for items marked with ⚠️ with the release reviewer. - [ ] ⚠️ Tag HEAD `release` commit with `vX.Y.Z` (`git tag -s vX.Y.Z -m 'Release X.Y.Z'`) -
- # create a signed tag - git tag -s vX.Y.Z -m 'Release X.Y.Z' -
- [ ] Run `git show vX.Y.Z` to ensure the tag is correct. -
- # show the signed tag - git show vX.Y.Z -
- [ ] ⚠️ Push the `vX.Y.Z` tag to GitHub (`git push origin vX.Y.Z`; DO NOT USE `git push --tags` because it pushes all your local tags). -
- # show the signed tag - git push origin vX.Y.Z -
- [ ] Publish the release. - [ ] Wait for [Publish docker image](https://github.com/ipfs/kubo/actions/workflows/docker-image.yml) workflow run initiated by the tag push to finish. - [ ] Add artifacts to https://dist.ipfs.tech by making a PR against [ipfs/distributions](https://github.com/ipfs/distributions) - [ ] Clone the `ipfs/distributions` repo locally. - [ ] Create a new branch (`kubo-release-vX.Y.Z`) from `master`. -
- # create a new branch - git checkout -b kubo-release-vX.Y.Z -
- [ ] Run `./dist.sh add-version kubo vX.Y.Z` to add the new version to the `versions` file ([instructions](https://github.com/ipfs/distributions#usage)). -
- # add new kubo version to dist - ./dist.sh add-version kubo vX.Y.Z - git add dists/*/versions - git commit -m "chore: add kubo vX.Y.Z" -
- [ ] Push the `kubo-release-vX.Y.Z` branch to GitHub and create a PR from that branch ([example](https://github.com/ipfs/distributions/pull/768)). -
- # push the change - git push origin kubo-release-vX.Y.Z - - # open a PR - gh api /repos/ipfs/distributions/pulls \ - --method POST \ - -f title='chore: add kubo vX.Y.Z' \ - -f head='kubo-release-vX.Y.Z' \ - -f base='master' -
- [ ] Ask for a review from the release reviewer. - [ ] Enable auto-merge for the PR. - PR build will build the artifacts and generate a diff in around 30 minutes - PR will be merged automatically once the diff is approved - `master` build will publish the artifacts to https://dist.ipfs.io in around 30 minutes -
- # get pull id - id=$(gh api --method GET /repos/ipfs/distributions/pulls -f head='kubo-release-vX.Y.Z' --jq '.[0].node_id') - - # enable automerge - gh api graphql -f pull="${id}" -f query='mutation($pull: ID!) { enablePullRequestAutoMerge(input: {pullRequestId: $pull, mergeMethod: SQUASH}) { pullRequest { autoMergeRequest { enabledBy { login } } } } }' -
- [ ] Ensure that the artifacts are available at https://dist.ipfs.io - [ ] Publish the release to [the NPM package](https://www.npmjs.com/package/go-ipfs?activeTab=versions) by running https://github.com/ipfs/npm-go-ipfs/actions/workflows/main.yml (it happens automatically but it is safe to speed up the process and kick of a run manually) - [ ] Cut the release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/v0.17.0)) - Use `vX.Y.Z` as the tag. - Copy the relevant [changelog](https://github.com/ipfs/kubo/blob/release/docs/changelogs/) into the release description. - Keep the release notes as trim as possible (e.g. remove top headers where possible, [example](https://github.com/ipfs/kubo/releases/tag/v0.17.0)) -
- # create the release - body="$(curl --retry 5 --no-progress-meter https://raw.githubusercontent.com/ipfs/kubo/release-vX.Y.Z/docs/changelogs/vX.Y.md)" - gh api /repos/ipfs/kubo/releases \ - --method POST \ - -f tag_name='vX.Y.Z' \ - -f name='vX.Y.Z' \ - -f body="${body}" \ - -F draft=false \ - -F prerelease=false \ - -F generate_release_notes=false \ - -f make_latest=true -
- [ ] Synchronize release artifacts by running [sync-release-assets](https://github.com/ipfs/kubo/actions/workflows/sync-release-assets.yml) workflow. -
- # dispatch workflow - gh api /repos/ipfs/kubo/actions/workflows/sync-release-assets.yml/dispatches \ - --method POST \ - -f ref='master' -
- [ ] TODO: https://github.com/protocol/bifrost-infra/issues/2184#issuecomment-1315279257 - [ ] Announce the release - [ ] Add a link to the release to this release issue as a comment. @@ -548,12 +194,6 @@ Checklist: - [ ] Update the draft PR created for [IPFS Desktop](https://github.com/ipfs-shipyard/ipfs-desktop) to use the new release and mark it as ready for review. - [ ] Update docs - [ ] Run https://github.com/ipfs/ipfs-docs/actions/workflows/update-on-new-ipfs-tag.yml to generate a PR to the docs repo -
- # dispatch workflow - gh api /repos/ipfs/ipfs-docs/actions/workflows/update-on-new-ipfs-tag.yml/dispatches \ - --method POST \ - -f ref='main' -
- [ ] Merge the auto-created PR in https://github.com/ipfs/ipfs-docs/pulls ([example](https://github.com/ipfs/ipfs-docs/pull/1263)) - [ ] Get the blog post created - [ ] Submit a request for blog post creation using [the form](https://airtable.com/shrNH8YWole1xc70I). From 5ff08e4e188dc56c1d5d2f1c15558996c64a54c6 Mon Sep 17 00:00:00 2001 From: galargh Date: Mon, 5 Dec 2022 09:56:55 +0100 Subject: [PATCH 11/12] docs: update top comment in release issue template --- docs/RELEASE_ISSUE_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index 992ec805904..f6fdef156c4 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -1,4 +1,4 @@ - + > Release Issue Template. If doing a patch release, see [here](https://github.com/ipfs/kubo/blob/master/docs/PATCH_RELEASE_TEMPLATE.md) From 928105865c31239d0412e1c53d4fd77651d67da5 Mon Sep 17 00:00:00 2001 From: Piotr Galar Date: Mon, 5 Dec 2022 10:02:15 +0100 Subject: [PATCH 12/12] Apply suggestions from code review --- docs/RELEASE_ISSUE_TEMPLATE.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/RELEASE_ISSUE_TEMPLATE.md b/docs/RELEASE_ISSUE_TEMPLATE.md index f6fdef156c4..13b14c8a4f9 100644 --- a/docs/RELEASE_ISSUE_TEMPLATE.md +++ b/docs/RELEASE_ISSUE_TEMPLATE.md @@ -85,7 +85,7 @@ Checklist: - [ ] Clone the `ipfs/distributions` repo locally. - [ ] Create a new branch (`kubo-release-vX.Y.Z-rcn`) from `master`. - [ ] Run `./dist.sh add-version kubo vX.Y.Z-rcN` to add the new version to the `versions` file ([instructions](https://github.com/ipfs/distributions#usage)). - - `dist.sh` will print _WARNING: not marking pre-release kubo vX.Y.Z-rcNn as the current version._. + - `dist.sh` will print _WARNING: not marking pre-release kubo vX.Y.Z-rcN as the current version._. - [ ] Push the `kubo-release-vX.Y.Z-rcn` branch to GitHub and create a PR from that branch ([example](https://github.com/ipfs/distributions/pull/760)). - [ ] Ask for a review from the release reviewer. - [ ] Enable auto-merge for the PR. @@ -94,14 +94,14 @@ Checklist: - `master` build will publish the artifacts to https://dist.ipfs.io in around 30 minutes - [ ] Ensure that the artifacts are available at https://dist.ipfs.io - [ ] Publish the RC to [the NPM package](https://www.npmjs.com/package/go-ipfs?activeTab=versions) by running https://github.com/ipfs/npm-go-ipfs/actions/workflows/main.yml (it happens automatically but it is safe to speed up the process and kick of a run manually) - - [ ] Cut a pre-release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/vX.Y.Z-rcN)) + - [ ] Cut a pre-release on [GitHub](https://github.com/ipfs/kubo/releases) ([instructions](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release), [example](https://github.com/ipfs/kubo/releases/tag/v0.17.0-rc1)) - Use `vX.Y.Z-rcN` as the tag. - Link to the release issue in the description. - Link to the relevant [changelog](https://github.com/ipfs/kubo/blob/master/docs/changelogs/) in the description. - Check `This is a pre-release`. - [ ] Synchronize release artifacts by running [sync-release-assets](https://github.com/ipfs/kubo/actions/workflows/sync-release-assets.yml) workflow. - [ ] Announce the RC - - [ ] Create a new post on [IPFS Discourse](https://discuss.ipfs.tech). ([example](https://discuss.ipfs.tech/t/kubo-v0-16-0-rcN-release-candidate-is-out/15248)) + - [ ] Create a new post on [IPFS Discourse](https://discuss.ipfs.tech). ([example](https://discuss.ipfs.tech/t/kubo-v0-16-0-rc1-release-candidate-is-out/15248)) - Use `Kubo vX.Y.Z-rcn Release Candidate is out!` as the title. - Use `kubo` and `go-ipfs` as topics. - Repeat the title as a heading (`##`) in the description.