From e84b88ab5590a958ff01a095306e278f9cca344f Mon Sep 17 00:00:00 2001 From: Bendik Aagaard Lynghaug Date: Thu, 8 Oct 2026 21:39:39 +0200 Subject: [PATCH] Release with cargo release Co-Authored-By: Claude Fable 5.1 --- README.md | 9 +++++++-- release.toml | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 release.toml diff --git a/README.md b/README.md index 424680a..6bbcc69 100644 --- a/README.md +++ b/README.md @@ -92,8 +92,13 @@ Or build it: `cargo build --release`, or `makepkg` at the repo root. ## Release -Bump `version` in `Cargo.toml` and `pkgver` in `PKGBUILD` to the same string, -commit, tag `vX.Y.Z`. CI refuses a tag that disagrees with either. Gitea +``` +cargo release patch --execute # or minor / major +``` + +cargo-release bumps `Cargo.toml`, mirrors the version into `PKGBUILD` with +`pkgrel=1` (see `release.toml`), commits, tags `vX.Y.Z` and pushes. CI refuses +a tag that disagrees with either file, so edit neither by hand. Gitea Actions then builds the package natively on both arches and uploads it to the registry, authenticated with the uhhm org's `REGISTRY_TOKEN` action secret, which every repo in the org inherits. diff --git a/release.toml b/release.toml new file mode 100644 index 0000000..779ab6f --- /dev/null +++ b/release.toml @@ -0,0 +1,15 @@ +# cargo release --execute: bumps Cargo.toml, mirrors the +# version into PKGBUILD (pkgrel back to 1), commits, tags v, pushes. +# The tag is what .gitea/workflows/release.yml builds and publishes. +publish = false +allow-branch = ["main"] + +[[pre-release-replacements]] +file = "PKGBUILD" +search = "pkgver=.*" +replace = "pkgver={{version}}" + +[[pre-release-replacements]] +file = "PKGBUILD" +search = "pkgrel=.*" +replace = "pkgrel=1"