diff --git a/.forge/ci.toml b/.forge/ci.toml index a5d2fe1..12ddc82 100644 --- a/.forge/ci.toml +++ b/.forge/ci.toml @@ -1,11 +1,13 @@ # CI for forge itself. Format: docs/ci.md, parser: crates/forge-ci/src/config.rs. # # The workflow has no branch condition, so the build job also runs for pull requests. +# A tag push matching "v*" that passes every job publishes a release with the build job's binaries and SHA256SUMS. [on] push = ["main"] pull_request = true manual = true +tags = ["v*"] [jobs.test] image = "docker.io/library/rust:1" @@ -23,10 +25,16 @@ needs = ["test"] # Runner has a few GB RAM and 2 CPUs: rustc runs one crate at a time because a single forge-web compile needs several GB. env = { CARGO_BUILD_JOBS = "1", CARGO_INCREMENTAL = "0" } run = """ -cargo build --profile dist -p forge-web -mkdir -p dist -cp target/dist/forge dist/forge +cargo build --profile dist -p forge-web -p forge-runner +ARCH=$(uname -m) +cp target/dist/forge forge-$ARCH-linux +cp target/dist/forge-runner forge-runner-$ARCH-linux +sha256sum forge-$ARCH-linux forge-runner-$ARCH-linux > SHA256SUMS +mkdir -p dist && cp target/dist/forge dist/forge """ -artifacts = ["dist/forge"] +artifacts = ["dist/forge", "forge-*-linux", "SHA256SUMS"] cache = ["target"] timeout_minutes = 120 + +[release] +assets = ["build:forge-*-linux", "build:SHA256SUMS"]