Cross-compile Rust CLI tools, publish binaries to Gitea releases, and make them installable with cargo binstall.
Go to file
Dandaedre 685b6f6865
Rust CI Cargo tests, coverage, or badge generation failed.
Gitea/rust_realease/pipeline/head There was a failure building this commit Details
chore: release 0.1.5
2026-10-05 10:59:44 +02:00
docs feat: support Gitea token files 2026-10-05 10:46:33 +02:00
scripts refactor(ci): centralize badge rendering 2026-10-04 01:33:47 +02:00
src fix: detect cargo-cross executable 2026-10-05 10:56:29 +02:00
tests fix: detect cargo-cross executable 2026-10-05 10:56:29 +02:00
.gitignore ci: publish current coverage badges 2026-10-03 03:07:45 +02:00
Cargo.lock chore: release 0.1.5 2026-10-05 10:59:44 +02:00
Cargo.toml chore: release 0.1.5 2026-10-05 10:59:44 +02:00
Cross.toml feat: add compile-only artifact builds 2026-09-30 22:33:00 +02:00
Jenkinsfile fix(ci): escape coverage regex for Groovy 2026-10-03 14:43:26 +02:00
LICENSE Initial commit 2026-09-13 11:52:35 +02:00
README.md feat: support Gitea token files 2026-10-05 10:46:33 +02:00
config.toml feat: support repository fallback URLs 2026-09-30 21:42:16 +02:00
release.sh feat: support Gitea token files 2026-10-05 10:46:33 +02:00
rust-release.toml chore: prepare v0.1.1 release 2026-09-30 22:23:22 +02:00
tarpaulin.toml test: raise meaningful coverage gate to 80 percent 2026-10-03 15:23:39 +02:00

README.md

rust_realease

current version test status line coverage

rust_realease builds Rust binary packages for multiple targets and publishes them as Gitea release assets. It is intended for maintainers who want repeatable Cross builds, checksums, cargo-binstall archives, and post-upload verification without maintaining a separate release pipeline.

Prerequisites and installation

Install Git, Cross, and a Cross-compatible Docker or Podman backend. The default archive format also requires cargo-binstall.

Install the latest prebuilt release:

cargo binstall --git https://proxy.dandaedre.com/gitea/idle-org/rust_realease \
  rust_realease
rust_realease --help

To build the current checkout instead:

cargo install --path . --locked

Quick start

Preview a local project without changing files, building binaries, or contacting Gitea:

rust_realease ./my-tool --dry-run

The preview reports the selected package and binaries, expected version tag, metadata changes, build targets, artifact names, prerequisites, and release destination. It exits nonzero when something needs attention. Select a package explicitly when the source is a workspace:

rust_realease ./my-workspace --package my-tool --dry-run

Build local artifacts through the package stage with:

rust_realease ./my-tool --compile-only

Artifacts and SHA256SUMS are written under dist/release-*/.

Publish a Gitea release

The package version must match a local tag, and the same tag must already exist on the remote. Publication also requires a clean checkout and an HTTPS Gitea release destination.

Store a Gitea access token in a single-line UTF-8 file and pass it directly:

rust_realease ./my-tool --token-file ../gitea_token.txt

The token file takes precedence over the configured token environment variable. Without --token-file, the default is GITEA_TOKEN. Grant the token repository read and release write access; preparation pushes also require code write access. Tokens are redacted from diagnostics and are not passed to Cargo or Cross child processes.

Use --prepare-repo --dry-run to preview supported metadata and repository preparation before publishing. See the advanced guide for explicit commit, tag, push, release-note, private-repository, and asset-replacement workflows.

Documentation

  • Advanced usage covers sources, configuration, metadata preparation, pipeline stages, artifact formats, authentication, this repository's release procedure, and troubleshooting.
  • rust_realease --help is the complete option reference.

Development

From the repository root, run:

cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --locked --all

Jenkins enforces an 80% line-coverage floor. The opt-in real cargo-binstall fixture requires its external test repository and is ignored by the ordinary test suite; its setup is documented in Advanced usage.

License and support

This project is licensed under the MIT License. Report problems in the canonical Gitea repository.