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"