From 88038af3f6ce784def974c3997e214135ee4e098 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 1 Feb 2022 11:28:43 +0000 Subject: [PATCH 1/8] Add release checklist --- RELEASING.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 RELEASING.md diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 0000000000..48f5141549 --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,65 @@ +# Release Checklist + +These steps assume that you've checked out the Soketto repository and are in the root directory of it. + +We also assume that ongoing work done is being merged directly to the `master` branch. + +1. Ensure that everything you'd like to see released is on the `master` branch. + +2. Create a release branch off `master`, for example `release-v0.17.0`. Decide how far the version needs to be bumped based + on the changes to date. If unsure what to bump the version to (e.g. is it a major, minor or patch release), check with the + Parity Tools team. + +3. Check that you're happy with the current documentation. + + ``` + cargo doc --open --all-features + ``` + + CI checks for broken internal links at the moment. Optionally you can also confirm that any external links + are still valid like so: + + ``` + cargo install cargo-deadlinks + cargo deadlinks --check-http -- --all-features + ``` + + If there are minor issues with the documentation, they can be fixed in the release branch. + +4. Bump the crate version in `Cargo.toml` to whatever was decided in step 2. + +5. Update `CHANGELOG.md` to reflect the difference between this release and last. If you're unsure of + what to add, check with the Tools team. See the `CHANGELOG.md` file for details of the format it follows. + + Any [closed PRs](https://github.com/paritytech/soketto/pulls?q=is%3Apr+is%3Aclosed) between the last release and + this release branch should be noted. + +6. Commit any of the above changes to the release branch and open a PR in GitHub with a base of `master`. + +7. Once the branch has been reviewed and passes CI, merge it. + +8. Now, we're ready to publish the release to crates.io. + + Checkout `master`, ensuring we're looking at that latest merge (`git pull`). + + Next, do a dry run to make sure that things seem sane: + ``` + cargo publish --dry-run + ``` + + If we're happy with everything, proceed with the release: + ``` + cargo publish + ``` + +9. If the release was successful, then tag the commit that we released in the `master` branch with the + version that we just released, for example: + + ``` + git tag v0.17.0 # use the version number you've just published to crates.io, not this one + git push --tags + ``` + + Once this is pushed, go along to [the releases page on GitHub](https://github.com/paritytech/soketto/releases) + and draft a new release which points to the tag you just pushed to `master` above. Copy the changelog comments + for the current release into the release description. \ No newline at end of file From 8678fbc743f18eca3caf2fc318e69b13339b65c8 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 1 Feb 2022 11:31:00 +0000 Subject: [PATCH 2/8] Subxt, not Soketto --- RELEASING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASING.md b/RELEASING.md index 48f5141549..c8f15cb72e 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,6 +1,6 @@ # Release Checklist -These steps assume that you've checked out the Soketto repository and are in the root directory of it. +These steps assume that you've checked out the Subxt repository and are in the root directory of it. We also assume that ongoing work done is being merged directly to the `master` branch. From 9c1b82fce099abbc8ed376e043cef7bda8b8a27e Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 1 Feb 2022 11:31:54 +0000 Subject: [PATCH 3/8] more Soketto -> Subxt fixes --- RELEASING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index c8f15cb72e..dff7d3a4ef 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -31,7 +31,7 @@ We also assume that ongoing work done is being merged directly to the `master` b 5. Update `CHANGELOG.md` to reflect the difference between this release and last. If you're unsure of what to add, check with the Tools team. See the `CHANGELOG.md` file for details of the format it follows. - Any [closed PRs](https://github.com/paritytech/soketto/pulls?q=is%3Apr+is%3Aclosed) between the last release and + Any [closed PRs](https://github.com/paritytech/subxt/pulls?q=is%3Apr+is%3Aclosed) between the last release and this release branch should be noted. 6. Commit any of the above changes to the release branch and open a PR in GitHub with a base of `master`. @@ -60,6 +60,6 @@ We also assume that ongoing work done is being merged directly to the `master` b git push --tags ``` - Once this is pushed, go along to [the releases page on GitHub](https://github.com/paritytech/soketto/releases) + Once this is pushed, go along to [the releases page on GitHub](https://github.com/paritytech/subxt/releases) and draft a new release which points to the tag you just pushed to `master` above. Copy the changelog comments for the current release into the release description. \ No newline at end of file From f41aa464f032d901180fe77c0d191aa72c029107 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 1 Feb 2022 13:04:46 +0000 Subject: [PATCH 4/8] Signed tags and note about incrementing version of each crate Co-authored-by: David Co-authored-by: Niklas Adolfsson --- RELEASING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index dff7d3a4ef..ba22e9a59b 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -26,7 +26,7 @@ We also assume that ongoing work done is being merged directly to the `master` b If there are minor issues with the documentation, they can be fixed in the release branch. -4. Bump the crate version in `Cargo.toml` to whatever was decided in step 2. +4. Bump the crate version in `Cargo.toml` to whatever was decided in step 2 for `subxt-codegen`, `subxt-macro`, `subxt` and `subxt-cli`. 5. Update `CHANGELOG.md` to reflect the difference between this release and last. If you're unsure of what to add, check with the Tools team. See the `CHANGELOG.md` file for details of the format it follows. @@ -56,7 +56,7 @@ We also assume that ongoing work done is being merged directly to the `master` b version that we just released, for example: ``` - git tag v0.17.0 # use the version number you've just published to crates.io, not this one + git tag -s v0.17.0 # use the version number you've just published to crates.io, not this one git push --tags ``` From 661fb72f74bc2690217cc28abfcbd8aba60c282e Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 1 Feb 2022 15:32:36 +0000 Subject: [PATCH 5/8] Add command to publish crates in required order --- RELEASING.md | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index dff7d3a4ef..b4b3b7c854 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -42,16 +42,27 @@ We also assume that ongoing work done is being merged directly to the `master` b Checkout `master`, ensuring we're looking at that latest merge (`git pull`). - Next, do a dry run to make sure that things seem sane: - ``` - cargo publish --dry-run - ``` + The crates in this repository need publishing in a specific order, since they depend on each other. + Additionally, `subxt-macro` has a circular dev dependency on `subxt`, so we use `cargo hack` to remove + dev dependencies (and `--allow-dorty` to ignore the git changes as a result) to publish it. + + So, first install `cargo hack` with `cargo install cargo hack`. Next, you can run something like the following + command to publish each crate in the required order (allowing a little time inbetween each to let `crates.io` catch up) + with what we've published). - If we're happy with everything, proceed with the release: ``` - cargo publish + (cd macro && cargo hack publish --no-dev-deps --allow-dirty --dry-run) && \ + sleep 5 && \ + (cd codegen && cargo publish --dry-run) && \ + sleep 5 && \ + cargo publishd --dry-run && \ + sleep 5 && \ + (cd cli && cargo publish --dry-run); ``` + If you run into any issues regarding crates not being able to find suitable versions of other `subxt-*` crates, + you may just need to wait a little longer and then run the remaining portion of that command. + 9. If the release was successful, then tag the commit that we released in the `master` branch with the version that we just released, for example: From e8a029a0abf3ed6982d9d19b87df1450859638bd Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 1 Feb 2022 17:51:38 +0000 Subject: [PATCH 6/8] undo test breakages and codegen first since macro depends on it --- RELEASING.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index de175cd24c..0e860ff0a0 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -51,13 +51,13 @@ We also assume that ongoing work done is being merged directly to the `master` b with what we've published). ``` - (cd macro && cargo hack publish --no-dev-deps --allow-dirty --dry-run) && \ + (cd codegen && cargo publish) && \ sleep 5 && \ - (cd codegen && cargo publish --dry-run) && \ + (cd macro && cargo hack publish --no-dev-deps --allow-dirty) && \ sleep 5 && \ - cargo publishd --dry-run && \ + cargo publish && \ sleep 5 && \ - (cd cli && cargo publish --dry-run); + (cd cli && cargo publish); ``` If you run into any issues regarding crates not being able to find suitable versions of other `subxt-*` crates, From f8bf9ccb2b9b8f1caf17c6592dd1f6296ab94cd8 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 2 Feb 2022 11:24:31 +0100 Subject: [PATCH 7/8] Update RELEASING.md Co-authored-by: Andrew Jones --- RELEASING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASING.md b/RELEASING.md index 0e860ff0a0..2111abd5ea 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -44,7 +44,7 @@ We also assume that ongoing work done is being merged directly to the `master` b The crates in this repository need publishing in a specific order, since they depend on each other. Additionally, `subxt-macro` has a circular dev dependency on `subxt`, so we use `cargo hack` to remove - dev dependencies (and `--allow-dorty` to ignore the git changes as a result) to publish it. + dev dependencies (and `--allow-dirty` to ignore the git changes as a result) to publish it. So, first install `cargo hack` with `cargo install cargo hack`. Next, you can run something like the following command to publish each crate in the required order (allowing a little time inbetween each to let `crates.io` catch up) From b09ce8f7d6dd464bf548568c5d777adbe936241d Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 2 Feb 2022 10:31:55 +0000 Subject: [PATCH 8/8] sleep 10, and text niggles --- RELEASING.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index 0e860ff0a0..de7633b955 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -28,7 +28,7 @@ We also assume that ongoing work done is being merged directly to the `master` b 4. Bump the crate version in `Cargo.toml` to whatever was decided in step 2 for `subxt-codegen`, `subxt-macro`, `subxt` and `subxt-cli`. -5. Update `CHANGELOG.md` to reflect the difference between this release and last. If you're unsure of +5. Update `CHANGELOG.md` to reflect the difference between this release and the last. If you're unsure of what to add, check with the Tools team. See the `CHANGELOG.md` file for details of the format it follows. Any [closed PRs](https://github.com/paritytech/subxt/pulls?q=is%3Apr+is%3Aclosed) between the last release and @@ -52,18 +52,18 @@ We also assume that ongoing work done is being merged directly to the `master` b ``` (cd codegen && cargo publish) && \ - sleep 5 && \ + sleep 10 && \ (cd macro && cargo hack publish --no-dev-deps --allow-dirty) && \ - sleep 5 && \ + sleep 10 && \ cargo publish && \ - sleep 5 && \ + sleep 10 && \ (cd cli && cargo publish); ``` If you run into any issues regarding crates not being able to find suitable versions of other `subxt-*` crates, you may just need to wait a little longer and then run the remaining portion of that command. -9. If the release was successful, then tag the commit that we released in the `master` branch with the +9. If the release was successful, tag the commit that we released in the `master` branch with the version that we just released, for example: ```