You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `cargo upgrade` command is part of the [`cargo-edit`](https://github.com/killercup/cargo-edit/blob/master/README.md#cargo-upgrade) project.
38
+
37
39
You should also check that the `cargo upgrade` output doesn't list any breaking releases of our dependencies.
38
40
Note that we have a public dependency on some crates (especially wgpu), which we want to keep synchronised across our projects.
39
41
40
42
This will be submitted as a PR, following normal processes.
41
43
42
44
See [rfcs#5](https://github.com/linebender/rfcs/blob/main/rfcs/0005-version-matrix.md#cargolock-is-updated-regularly) for motivation of this strategy.
43
45
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.
45
53
46
54
Anyone can prepare the release PR (although it should be an organisation member).
47
55
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.
48
56
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`.
50
63
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
52
67
53
68
The updates required in the changelog are as follows:
54
69
@@ -87,8 +102,8 @@ In the evening in America this might be the next day than the one in your calend
87
102
88
103
## Releasing
89
104
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.
92
107
93
108
### Checking permissions
94
109
@@ -115,6 +130,10 @@ The release PR should be merged, after it has been approved.
115
130
This will use our standard merge queue.
116
131
The merge will be queued by the person performing the release.
117
132
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
+
118
137
### Validating correct commit
119
138
120
139
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.
130
149
If you're publishing multiple crates at once, you should publish using `cargo publish -p {crate1} -p {crate2}`.
131
150
This ensures that each of the crates will compile successfully.
132
151
152
+
### Adding owners (new crates only)
153
+
133
154
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.
135
157
Ask on Zulip if you're unsure about this step.
136
158
137
159
### GitHub release
@@ -193,19 +215,23 @@ We also occasionally share releases on Mastodon.
<ahref="#dependencies"aria-label="Section on updating dependencies">↩︎</a>
201
225
</div>
202
226
203
227
<div>
204
-
<inputtype="checkbox"id="before-version-number"></input><labelfor="before-version-number">Version numbers bumped in Cargo.toml. Publish <b>dry run</b> performed.</label>
228
+
<inputtype="checkbox"id="before-version-number"></input><labelfor="before-version-number">Version numbers bumped in Cargo.toml. <b>Dry run</b> of the publish performed.</label>
229
+
<ahref="#updating-package-versions"aria-label="Section on increasing Cargo version numbers">↩︎</a>
205
230
</div>
206
231
207
232
<div>
208
-
<inputtype="checkbox"id="before-changelog-links"></input><labelfor="before-changelog-links">All parts of the changelog updated, and markdownlint ran.</label>
233
+
<inputtype="checkbox"id="before-changelog-links"></input><labelfor="before-changelog-links">All parts of the changelog reflect the new release, and markdownlint ran.</label>
234
+
<ahref="#announcing-release-in-the-changelog"aria-label="Section on showing the release in the changelog">↩︎</a>
209
235
</div>
210
236
211
237
</fieldset>
@@ -216,34 +242,42 @@ We also occasionally share releases on Mastodon.
<ahref="#checking-permissions"aria-label="Section on validating permissions">↩︎</a>
219
246
</div>
220
247
221
248
<div>
222
249
<inputtype="checkbox"id="during-date"></input><labelfor="during-date">Release date in changelog updated to today's date (in UTC). markdownlint executed.</label>
250
+
<ahref="#checking-the-dates"aria-label="Section on updating the date">↩︎</a>
223
251
</div>
224
252
225
253
<div>
226
254
<inputtype="checkbox"id="during-merged"></input><labelfor="during-merged">Release PR merged by person who will do the release.</label>
255
+
<ahref="#merging-the-release-pr"aria-label="Section on merging the release PR">↩︎</a>
227
256
</div>
228
257
229
258
<div>
230
259
<inputtype="checkbox"id="during-checkout"></input><labelfor="during-checkout">Checked out (and validated) the merged commit on main.</label>
260
+
<ahref="#validating-correct-commit"aria-label="Section on checking the commit">↩︎</a>
231
261
</div>
232
262
233
263
<div>
234
264
<inputtype="checkbox"id="during-published"></input><labelfor="during-published">Published to crates.io.</label>
265
+
<ahref="#publishing"aria-label="Section on publishing">↩︎</a>
235
266
</div>
236
267
237
268
<div>
238
269
<inputtype="checkbox"id="during-added-owners"></input><labelfor="during-added-owners">For new crates only: Additional owners added on crates.io.</label>
270
+
<ahref="#adding-owners-new-crates-only"aria-label="Section on adding new owners">↩︎</a>
239
271
</div>
240
272
241
273
<div>
242
274
<inputtype="checkbox"id="during-github-release"></input><labelfor="during-github-release">Release on GitHub made.</label>
275
+
<ahref="#github-release"aria-label="Section on making a GitHub release">↩︎</a>
243
276
</div>
244
277
245
278
<div>
246
279
<inputtype="checkbox"id="during-zulip"></input><labelfor="during-zulip">Announcement message sent to the Zulip for the release.</label>
280
+
<ahref="#zulip-message"aria-label="Section on announcing on Zulip">↩︎</a>
0 commit comments