Skip to content

Commit 1df1069

Browse files
authored
docs: update release procedure[skip ci] (#2415)
1 parent c003ae9 commit 1df1069

File tree

1 file changed

+37
-8
lines changed

1 file changed

+37
-8
lines changed

RELEASE_PROCEDURE.md

+37-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ library.
55

66
Nix uses [cargo release](https://github.com/crate-ci/cargo-release) to automate
77
the release process. Based on changes since the last release, pick a new
8-
version number following semver conventions. For nix, a change that drops
8+
version number following semver conventions. For Nix, a change that drops
99
support for some Rust versions counts as a breaking change, and requires a
1010
major bump.
1111

@@ -14,24 +14,53 @@ The release is prepared as follows:
1414
> NOTE: the following procedure should be done directly against the master
1515
> branch of the repo.
1616
17-
- Ask for a new libc version if, necessary. It usually is. Then update the
18-
dependency in `Cargo.toml` to rely on a release from crates.io.
17+
- Clone the `nix-rust/nix` repository with your preferred way, and `cd` to it:
18+
19+
```sh
20+
$ git clone https://github.com/nix-rust/nix.git
21+
$ cd nix
22+
```
23+
24+
- If we are using `libc` from git, replace it with a usable release from crates.io.
1925

2026
```diff
2127
[dependencies]
2228
-libc = { git = "https://github.com/rust-lang/libc", rev = "<Revision>", features = ["extra_traits"] }
23-
+libc = { version = "<New Version>", features = ["extra_traits"] }
29+
+libc = { version = "<Version>", features = ["extra_traits"] }
2430
```
2531

2632
- Update the version number in `Cargo.toml`
2733
- Generate `CHANGELOG.md` for this release by
28-
`towncrier build --version=<VERSION> --yes`
34+
35+
```sh
36+
$ towncrier build --version=<VERSION> --yes
37+
Loading template...
38+
Finding news fragments...
39+
Rendering news fragments...
40+
Writing to newsfile...
41+
Staging newsfile...
42+
Removing the following files:
43+
nix/changelog/xxxx.xxxx.md
44+
nix/changelog/xxxx.xxxx.md
45+
...
46+
nix/changelog/xxxx.xxxx.md
47+
Removing news fragments...
48+
Done!
49+
```
50+
51+
- Push the changes made by the above steps to the master branch
2952

3053
- Ensure you have a crates.io token
31-
1. With the `publich-update` scope
54+
1. With the `publish-update` scope
3255
2. Can be used for crate `nix`
3356
3. It is set via `cargo login`
3457

58+
If not, create a new token [here](https://crates.io/settings/tokens), and set
59+
it.
60+
3561
- Confirm that everything's ready for a release by running
36-
`cargo release <patch|minor|major>`
37-
- Create the release with `cargo release -x <patch|minor|major>`
62+
`cargo release <VERSION>`
63+
- Create the release with `cargo release -x <VERSION>`, this step will publish
64+
the version to crates.io and push the new version tag to GitHub.
65+
66+
- Congratulations on a new Nix release!

0 commit comments

Comments
 (0)