docs/wiki/Development:-Releasing-niri.md
This is a checklist of things to release a new niri version.
We'll use 26.04 as the example new version.
When making a patch release, append the patch number like 26.04.1.
Plan for a few days of work, this usually takes a while.
During this process, also check:
README.md.We use year.month.patch versioning.
If the month contains a leading zero, drop it from the crate version (Cargo requirement).
You can use the command from cargo-edit:
cargo set-version 26.4.0
Then, manually update version in:
[package.metadata.generate-rpm] in Cargo.tomlniri-ipc/README.mdniri-ipc/src/lib.rsDo a full text search for the old version to make sure there are no other places.
Do a full text search for next release, replace everything with the new version number.
Run all tests:
RUN_SLOW_TESTS=1 cargo test --release --all
cargo package -p niri-ipc and make sure it succeeds.Set the "Public version" input to a version like 26.04.
This workflow will:
Make sure it succeeds and grab the vendored dependency archive that it produces.
You can grab the previous spec from the last build in the COPR.
26.04.git rev-parse HEAD.Release: number to 1 if it was higher.To run a test build, you can download the vendored dependency archive from the last step.
Comment/uncomment Source: and %autosetup lines accordingly.
Download the source files:
spectool -g niri.spec
Build RPMs:
fedpkg --release 44 mockbuild
During the build, it will print the list of licenses.
Update it in both the COPR spec and in niri.spec.rpkg accordingly.
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.
Revert any temporary changes that you did to the COPR spec for local testing.
The tag starts with a v:
git tag -am "v26.04 release" v26.04
git push origin v26.04
While you can let GitHub create the tag automatically upon creating the release, this is not recommended. GitHub creates a lightweight tag, but we want an annotated tag that plays better with various tooling.
v26.04.v26.04.cargo publish -p niri-ipc
Upload on the web or:
copr-cli build niri niri.spec
Chat rooms, social media, etc.