1 ADR 0010 automated multi platform forgejo release workflow
MailSweep Doc Bot edited this page 2026-08-30 17:03:42 +00:00

10. Automated Multi-Platform Forgejo Release Workflow

Date: 2026-08-30

Status

Accepted

Context

With MailSweep implemented as a single, synchronous Rust codebase, distribution requires automated continuous integration to cross-compile, package, checksum, and publish standalone binaries for multiple platforms whenever a new version tag (v*) is pushed.

Our CI infrastructure runs on Forgejo Actions with Ubuntu-based container runners (ubuntu-latest). We need cross-platform binary distribution without requiring dedicated physical Windows runners.

Decision

We will implement an automated release workflow in .forgejo/workflows/release.yml with the following architectural decisions:

  1. Target Compilation Matrix:

    • x86_64-unknown-linux-gnu: Standard Linux x86_64 (native runner toolchain).
    • aarch64-unknown-linux-gnu: Linux ARM64 (cross-compiled with gcc-aarch64-linux-gnu).
    • x86_64-pc-windows-gnu: Windows x86_64 (cross-compiled on Linux using mingw-w64).
  2. Dual-Binary Packaging:

    • Package both compiled binary entrypoints (mailsweep and forgejo) into each release archive.
    • Include README.md, LICENSE, rules.json, and sources.json in the archive root.
  3. Archive Packaging & Cryptographic Integrity:

    • Package .tar.gz archives for Linux targets and .zip archives for Windows targets.
    • Archive naming format: mailsweep-${VERSION}-${TARGET}.(tar.gz|zip).
    • Compute standalone SHA-256 digest files (.sha256) for every archive.
  4. Trigger & Publishing Semantics:

    • Triggers on git tags matching v* (e.g. v0.1.0) and manual workflow_dispatch.
    • Automatically publishes release assets to the matching Forgejo release via the Forgejo REST API.

Consequences

  • End users on Windows and Linux can download pre-compiled, standalone MailSweep binaries with verified checksums.
  • Eliminates the need for end users or server operators to install Cargo/Rust toolchains.
  • Cross-compiles all target architectures inside unified Linux container runners.