wiki: Document the release process
Browse files at this commit8ed0da44d974c32c6877d2f4630c314da0717ecbParent: 91be6623 changed files +132 -0
- docs/mkdocs.yaml +1 -0
- docs/wiki/Development:-Releasing-niri.md +130 -0
- docs/wiki/_Sidebar.md +1 -0
docs/mkdocs.yamlmodified+1 -0
| @@ -111,6 +111,7 @@ nav: | |||
| 111 | - Design Principles: Development:-Design-Principles.md | 111 | - Design Principles: Development:-Design-Principles.md |
| 112 | - Developing niri: Development:-Developing-niri.md | 112 | - Developing niri: Development:-Developing-niri.md |
| 113 | - Documenting niri: Development:-Documenting-niri.md | 113 | - Documenting niri: Development:-Documenting-niri.md |
| 114 | + - Releasing niri: Development:-Releasing-niri.md | ||
| 114 | - Fractional Layout: Development:-Fractional-Layout.md | 115 | - Fractional Layout: Development:-Fractional-Layout.md |
| 115 | - Redraw Loop: Development:-Redraw-Loop.md | 116 | - Redraw Loop: Development:-Redraw-Loop.md |
| 116 | - Animation Timing: Development:-Animation-Timing.md | 117 | - Animation Timing: Development:-Animation-Timing.md |
docs/wiki/Development:-Releasing-niri.mdadded+130 -0
| @@ -0,0 +1,130 @@ | |||
| 1 | +This is a checklist of things to release a new niri version. | ||
| 2 | + | ||
| 3 | +We'll use `26.04` as the example new version. | ||
| 4 | +When making a patch release, append the patch number like `26.04.1`. | ||
| 5 | + | ||
| 6 | +## Prepare the release notes | ||
| 7 | + | ||
| 8 | +Plan for a few days of work, this usually takes a while. | ||
| 9 | + | ||
| 10 | +During this process, also check: | ||
| 11 | + | ||
| 12 | +- that all additions are marked with "next release" on the wiki, | ||
| 13 | +- if anything needs updating in `README.md`. | ||
| 14 | + | ||
| 15 | +## Bump version | ||
| 16 | + | ||
| 17 | +We use `year.month.patch` versioning. | ||
| 18 | +If the month contains a leading zero, drop it from the crate version (Cargo requirement). | ||
| 19 | + | ||
| 20 | +You can use the command from [cargo-edit](https://github.com/killercup/cargo-edit): | ||
| 21 | + | ||
| 22 | +``` | ||
| 23 | +cargo set-version 26.4.0 | ||
| 24 | +``` | ||
| 25 | + | ||
| 26 | +Then, manually update version in: | ||
| 27 | + | ||
| 28 | +- `[package.metadata.generate-rpm]` in Cargo.toml | ||
| 29 | +- Dependency example in `niri-ipc/README.md` | ||
| 30 | +- Dependency example in `niri-ipc/src/lib.rs` | ||
| 31 | + | ||
| 32 | +Do a full text search for the old version to make sure there are no other places. | ||
| 33 | + | ||
| 34 | +## Replace all "Since: next release" mentions | ||
| 35 | + | ||
| 36 | +Do a full text search for `next release`, replace everything with the new version number. | ||
| 37 | + | ||
| 38 | +## Build, test, push, and have the CI run | ||
| 39 | + | ||
| 40 | +Run all tests: | ||
| 41 | + | ||
| 42 | +``` | ||
| 43 | +RUN_SLOW_TESTS=1 cargo test --release --all | ||
| 44 | +``` | ||
| 45 | + | ||
| 46 | +- Run `cargo package -p niri-ipc` and make sure it succeeds. | ||
| 47 | +- Make sure the CI passes. | ||
| 48 | +- Make sure the niri-git COPR build passes. | ||
| 49 | + | ||
| 50 | +## Trigger the "Prepare release" workflow on GitHub Actions | ||
| 51 | + | ||
| 52 | +Set the "Public version" input to a version like `26.04`. | ||
| 53 | + | ||
| 54 | +This workflow will: | ||
| 55 | + | ||
| 56 | +- do some pre-release checks like grepping the wiki for "next version", | ||
| 57 | +- make a vendored dependency archive, | ||
| 58 | +- build and test niri with that dependency archive, | ||
| 59 | +- draft a new GitHub release with the archive attached. | ||
| 60 | +It will NOT override an existing draft release with the same name so the release notes are safe. | ||
| 61 | + | ||
| 62 | +Make sure it succeeds and grab the vendored dependency archive that it produces. | ||
| 63 | + | ||
| 64 | +## Update the niri COPR spec, update licenses in .spec.rpkg | ||
| 65 | + | ||
| 66 | +You can grab the previous spec from [the last build](https://copr.fedorainfracloud.org/coprs/yalter/niri/builds/) in the COPR. | ||
| 67 | + | ||
| 68 | +- Update version global to `26.04`. | ||
| 69 | +- Update commit global to the commit hash corresponding to the release commit. | ||
| 70 | +You can use `git rev-parse HEAD`. | ||
| 71 | +- Reset the `Release:` number to 1 if it was higher. | ||
| 72 | + | ||
| 73 | +To run a test build, you can download the vendored dependency archive from the last step. | ||
| 74 | +Comment/uncomment `Source:` and `%autosetup` lines accordingly. | ||
| 75 | + | ||
| 76 | +Download the source files: | ||
| 77 | + | ||
| 78 | +``` | ||
| 79 | +spectool -g niri.spec | ||
| 80 | +``` | ||
| 81 | + | ||
| 82 | +Build RPMs: | ||
| 83 | + | ||
| 84 | +``` | ||
| 85 | +fedpkg --release 44 mockbuild | ||
| 86 | +``` | ||
| 87 | + | ||
| 88 | +During the build, it will print the list of licenses. | ||
| 89 | +Update it in both the COPR spec and in `niri.spec.rpkg` accordingly. | ||
| 90 | + | ||
| 91 | +If you had to update `niri.spec.rpkg` and therefore make another commit to the niri repo, make sure to update the commit hash in the COPR spec again. | ||
| 92 | + | ||
| 93 | +Revert any temporary changes that you did to the COPR spec for local testing. | ||
| 94 | + | ||
| 95 | +## Create and push the release git tag | ||
| 96 | + | ||
| 97 | +The tag starts with a `v`: | ||
| 98 | + | ||
| 99 | +``` | ||
| 100 | +git tag -am "v26.04 release" v26.04 | ||
| 101 | +git push origin v26.04 | ||
| 102 | +``` | ||
| 103 | + | ||
| 104 | +While you can let GitHub create the tag automatically upon creating the release, this is not recommended. | ||
| 105 | +GitHub creates a *lightweight* tag, but we want an annotated tag that plays better with various tooling. | ||
| 106 | + | ||
| 107 | +## Publish the release on GitHub | ||
| 108 | + | ||
| 109 | +- Either upload the vendored dependencies file to your draft release with the release notes, or move the release notes to the GitHub-created release (the difference is that it's attributed to github-actions). | ||
| 110 | +- Set the tag to `v26.04`. | ||
| 111 | +- Set the release title to `v26.04`. | ||
| 112 | +- Check "Create a discussion for this release". | ||
| 113 | + | ||
| 114 | +## Publish the niri-ipc crate | ||
| 115 | + | ||
| 116 | +``` | ||
| 117 | +cargo publish -p niri-ipc | ||
| 118 | +``` | ||
| 119 | + | ||
| 120 | +## Kick off the COPR build | ||
| 121 | + | ||
| 122 | +Upload on the web or: | ||
| 123 | + | ||
| 124 | +``` | ||
| 125 | +copr-cli build niri niri.spec | ||
| 126 | +``` | ||
| 127 | + | ||
| 128 | +## Announce the release | ||
| 129 | + | ||
| 130 | +Chat rooms, social media, etc. | ||
docs/wiki/_Sidebar.mdmodified+1 -0
| @@ -42,6 +42,7 @@ | |||
| 42 | * [Design Principles](./Development:-Design-Principles.md) | 42 | * [Design Principles](./Development:-Design-Principles.md) |
| 43 | * [Developing niri](./Development:-Developing-niri.md) | 43 | * [Developing niri](./Development:-Developing-niri.md) |
| 44 | * [Documenting niri](./Development:-Documenting-niri.md) | 44 | * [Documenting niri](./Development:-Documenting-niri.md) |
| 45 | +* [Releasing niri](./Development:-Releasing-niri.md) | ||
| 45 | * [Fractional Layout](./Development:-Fractional-Layout.md) | 46 | * [Fractional Layout](./Development:-Fractional-Layout.md) |
| 46 | * [Redraw Loop](./Development:-Redraw-Loop.md) | 47 | * [Redraw Loop](./Development:-Redraw-Loop.md) |
| 47 | * [Animation Timing](./Development:-Animation-Timing.md) | 48 | * [Animation Timing](./Development:-Animation-Timing.md) |