On Windows, std::fs::canonicalize returns an extended-length path
with the \?\ prefix, which does not support forward slashes.
Using format!("{}/{}", ...) to join paths then caused os error 123
(ERROR_INVALID_NAME).
Replace all string-based path concatenation with PathBuf::join so
that the OS-appropriate separator is used on every platform.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CI does not have macOS or Windows runners, so provide scripts to
build and optionally upload release archives locally.
- scripts/build-release-macos.sh — builds x86_64 and aarch64-apple-darwin
- scripts/build-release-windows.ps1 — builds x86_64-pc-windows-msvc
- scripts/.env.example — template for Gitea credentials
Both scripts read GITEA_TOKEN, GITEA_SERVER_URL, and GITEA_REPOSITORY
from the environment or from scripts/.env (which is gitignored).
Upload to Gitea is skipped when GITEA_TOKEN is not set.
Use curl.exe for multipart upload in the PowerShell script to support
Windows PowerShell 5.1 (Invoke-RestMethod -Form requires PS 6.1+).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
cross runs builds inside a Docker container, so the host-installed
Rust toolchain is not visible. Replace with cargo-zigbuild which
uses Zig as a cross-linker and runs directly on the host.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The act-runner environment does not have rustup pre-installed.
Install it using the official sh.rustup.rs script and append
~/.cargo/bin to GITHUB_PATH so subsequent steps can find the tools.
Node.js-based actions (actions/checkout, gitea-release-action) run
on the host runner where Node.js is available, so no container image
is needed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace manual curl-based release creation and asset upload with
akkuman/gitea-release-action@v1. Each build job now independently
creates/updates the release and uploads its asset in a single step.
Also remove macOS and Windows jobs as those runners are not available.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fetch latest release from Gitea API using existing reqwest client
- Match release asset by BUILD_TARGET triple (supports .tar.gz and .zip)
- Compare versions; show confirmation prompt (skippable with -y/--yes)
- Download archive, extract binary, atomically replace self via self-replace
- Support private repositories via GITEA_TOKEN environment variable
- Expose BUILD_TARGET in build.rs for compile-time target triple detection
- Add .gitea/workflows/release.yml for multi-platform release builds on tag push
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>