Skip to content

Commit ee32016

Browse files
authored
Clarify docs of the release process (#133)
Resulting from discussion in [#vello > Vello CPU v0.0.5](https://xi.zulipchat.com/#narrow/channel/197075-vello/topic/Vello.20CPU.20v0.2E0.2E5/with/566898950) Also adds "backlinks" from the checklist to the relevant sections
1 parent eb5fb96 commit ee32016

1 file changed

Lines changed: 47 additions & 13 deletions

File tree

content/wiki/process/release.md

Lines changed: 47 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ For backports, see the [Backports in Linebender Projects](@/wiki/process/backpor
1313

1414
## Before the release
1515

16-
### Preparing for a release
16+
### Updating the changelog
1717

1818
We should make sure that the changelog accurately reflects all important changes since the previous release.
1919
It's especially important that we capture all breaking changes.
2020
This happens as a normal PR, following normal processes.
21-
We want to have any updates to the changelog content happen before the release PR itself (see [Preparing the release](#preparing-the-release)).
22-
This is primarily because changelog content updates are more likely to run into merge conflicts.
21+
We want to have any updates to the changelog content happen before the release PR itself (see [Updating version numbers](#updating-version-numbers)).
22+
This is primarily because changelog content updates are more likely to run into merge conflicts, and require more thorough review.
2323

2424
### Dependencies
2525

@@ -34,21 +34,36 @@ cargo upgrade --ignore-rust-version
3434
cargo update --ignore-rust-version
3535
```
3636

37+
The `cargo upgrade` command is part of the [`cargo-edit`](https://github.com/killercup/cargo-edit/blob/master/README.md#cargo-upgrade) project.
38+
3739
You should also check that the `cargo upgrade` output doesn't list any breaking releases of our dependencies.
3840
Note that we have a public dependency on some crates (especially wgpu), which we want to keep synchronised across our projects.
3941

4042
This will be submitted as a PR, following normal processes.
4143

4244
See [rfcs#5](https://github.com/linebender/rfcs/blob/main/rfcs/0005-version-matrix.md#cargolock-is-updated-regularly) for motivation of this strategy.
4345

44-
### Preparing the release
46+
### Updating version numbers
47+
48+
Once the above steps are done, we will be ready to create the release PR.
49+
This PR should only:
50+
51+
- update version numbers in `Cargo.toml` files (and therefore also `Cargo.lock`) files; AND
52+
- rename the "unreleased" section of the changelog to the version number of the new release.
4553

4654
Anyone can prepare the release PR (although it should be an organisation member).
4755
The PR which makes a release should *only* bump version numbers in Cargo.toml (and Cargo.lock) files, and update the changelog as described below.
4856

49-
To validate the release, you can run: `cargo publish -p {crate1} -p {crate2} --dry-run`.
57+
#### Updating package versions
58+
59+
The version field in the Cargo.toml file of each package to be published (or the workspace version number) should be increased.
60+
The version specification for each package to be released in the `[workspace.dependencies]` section of the workspace root `Cargo.toml` will also need to be updated (if present).
61+
62+
Once the Cargo.toml files are updated, to validate the release, you can run: `cargo publish -p {crate1} -p {crate2} --dry-run`.
5063
At this stage, you should *only* be doing a dry run.
51-
Cargo should probably not be logged into crates.io at this stage.
64+
We recommend not having Cargo logged into crates.io at all times, to avoid accidentally publishing at this time, as well as for security in general.
65+
66+
#### Announcing release in the changelog
5267

5368
The updates required in the changelog are as follows:
5469

@@ -87,8 +102,8 @@ In the evening in America this might be the next day than the one in your calend
87102

88103
## Releasing
89104

90-
Release pull requests are an exception to our "author merges" policy.
91-
Instead release PRs can only be merged by someone who has release permissions, and who will then perform the release once the PR is merged.
105+
The following steps are to be performed by the person who will perform the release (i.e. run `cargo publish`).
106+
These all happen in sequence, once the release PR has been approved and everything else is in order.
92107

93108
### Checking permissions
94109

@@ -115,6 +130,10 @@ The release PR should be merged, after it has been approved.
115130
This will use our standard merge queue.
116131
The merge will be queued by the person performing the release.
117132

133+
Note that release pull requests are an exception to our "author merges" policy.
134+
Instead release PRs can only be merged by the person who is performing the release.
135+
This ensures that proper ownership of the release process is maintained.
136+
118137
### Validating correct commit
119138

120139
Once the release PR has been merged, you should check out the main branch, and pull from it.
@@ -130,8 +149,11 @@ Note that we don't enforce this.
130149
If you're publishing multiple crates at once, you should publish using `cargo publish -p {crate1} -p {crate2}`.
131150
This ensures that each of the crates will compile successfully.
132151

152+
### Adding owners (new crates only)
153+
133154
For new crates, we make sure that at least three Linebender organisation members have publish permissions.
134-
This should include Raph, and at least one organisation admin.
155+
This should always include Raph, and at least one other organisation admin.
156+
Note that this includes yourself, as the person who released the new crate.
135157
Ask on Zulip if you're unsure about this step.
136158

137159
### GitHub release
@@ -193,19 +215,23 @@ We also occasionally share releases on Mastodon.
193215
<legend>Before Release</legend>
194216

195217
<div>
196-
<input type="checkbox" id="before-dependencies"></input><label for="before-dependencies">Dependencies up-to-date.</label>
218+
<input type="checkbox" id="before-changelog"></input><label for="before-changelog">Changelog up-to-date.</label>
219+
<a href="#updating-the-changelog" aria-label="Section on updating the changelog">↩︎</a>
197220
</div>
198221

199222
<div>
200-
<input type="checkbox" id="before-changelog"></input><label for="before-changelog">Changelog up-to-date.</label>
223+
<input type="checkbox" id="before-dependencies"></input><label for="before-dependencies">Dependencies up-to-date.</label>
224+
<a href="#dependencies" aria-label="Section on updating dependencies">↩︎</a>
201225
</div>
202226

203227
<div>
204-
<input type="checkbox" id="before-version-number"></input><label for="before-version-number">Version numbers bumped in Cargo.toml. Publish <b>dry run</b> performed.</label>
228+
<input type="checkbox" id="before-version-number"></input><label for="before-version-number">Version numbers bumped in Cargo.toml. <b>Dry run</b> of the publish performed.</label>
229+
<a href="#updating-package-versions" aria-label="Section on increasing Cargo version numbers">↩︎</a>
205230
</div>
206231

207232
<div>
208-
<input type="checkbox" id="before-changelog-links"></input><label for="before-changelog-links">All parts of the changelog updated, and markdownlint ran.</label>
233+
<input type="checkbox" id="before-changelog-links"></input><label for="before-changelog-links">All parts of the changelog reflect the new release, and markdownlint ran.</label>
234+
<a href="#announcing-release-in-the-changelog" aria-label="Section on showing the release in the changelog">↩︎</a>
209235
</div>
210236

211237
</fieldset>
@@ -216,34 +242,42 @@ We also occasionally share releases on Mastodon.
216242

217243
<div>
218244
<input type="checkbox" id="during-permissions"></input><label for="during-permissions">Correct permissions validated.</label>
245+
<a href="#checking-permissions" aria-label="Section on validating permissions">↩︎</a>
219246
</div>
220247

221248
<div>
222249
<input type="checkbox" id="during-date"></input><label for="during-date">Release date in changelog updated to today's date (in UTC). markdownlint executed.</label>
250+
<a href="#checking-the-dates" aria-label="Section on updating the date">↩︎</a>
223251
</div>
224252

225253
<div>
226254
<input type="checkbox" id="during-merged"></input><label for="during-merged">Release PR merged by person who will do the release.</label>
255+
<a href="#merging-the-release-pr" aria-label="Section on merging the release PR">↩︎</a>
227256
</div>
228257

229258
<div>
230259
<input type="checkbox" id="during-checkout"></input><label for="during-checkout">Checked out (and validated) the merged commit on main.</label>
260+
<a href="#validating-correct-commit" aria-label="Section on checking the commit">↩︎</a>
231261
</div>
232262

233263
<div>
234264
<input type="checkbox" id="during-published"></input><label for="during-published">Published to crates.io.</label>
265+
<a href="#publishing" aria-label="Section on publishing">↩︎</a>
235266
</div>
236267

237268
<div>
238269
<input type="checkbox" id="during-added-owners"></input><label for="during-added-owners">For new crates only: Additional owners added on crates.io.</label>
270+
<a href="#adding-owners-new-crates-only" aria-label="Section on adding new owners">↩︎</a>
239271
</div>
240272

241273
<div>
242274
<input type="checkbox" id="during-github-release"></input><label for="during-github-release">Release on GitHub made.</label>
275+
<a href="#github-release" aria-label="Section on making a GitHub release">↩︎</a>
243276
</div>
244277

245278
<div>
246279
<input type="checkbox" id="during-zulip"></input><label for="during-zulip">Announcement message sent to the Zulip for the release.</label>
280+
<a href="#zulip-message" aria-label="Section on announcing on Zulip">↩︎</a>
247281
</div>
248282

249283
</fieldset>

0 commit comments

Comments
 (0)