forge
Explore
Log in

Don't you dare go Hollow

Publish a release with binaries and SHA256SUMS on v* tags

Browse files at this commit

b6b26bb2d5c7c8fde36d9a63581d297e4f0346daAhmet Kaan GümüşParent: 51b2bbf
  • ci
    • publish a release with binaries and SHA256SUMS on v* tags
Show full message
👷 ci: publish a release with binaries and SHA256SUMS on v* tags

Keeps dist/forge as an artifact so self-update still finds dist_forge.
.forge/ci.tomlmodified+12 -4
@@ -1,11 +1,13 @@
1 # CI for forge itself. Format: docs/ci.md, parser: crates/forge-ci/src/config.rs.1 # CI for forge itself. Format: docs/ci.md, parser: crates/forge-ci/src/config.rs.
2 #2 #
3 # The workflow has no branch condition, so the build job also runs for pull requests.3 # The workflow has no branch condition, so the build job also runs for pull requests.
4+# A tag push matching "v*" that passes every job publishes a release with the build job's binaries and SHA256SUMS.
4 5
5 [on]6 [on]
6 push = ["main"]7 push = ["main"]
7 pull_request = true8 pull_request = true
8 manual = true9 manual = true
10+tags = ["v*"]
9 11
10 [jobs.test]12 [jobs.test]
11 image = "docker.io/library/rust:1"13 image = "docker.io/library/rust:1"
@@ -23,10 +25,16 @@ needs = ["test"]
23 # 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.25 # 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.
24 env = { CARGO_BUILD_JOBS = "1", CARGO_INCREMENTAL = "0" }26 env = { CARGO_BUILD_JOBS = "1", CARGO_INCREMENTAL = "0" }
25 run = """27 run = """
26-cargo build --profile dist -p forge-web28+cargo build --profile dist -p forge-web -p forge-runner
27-mkdir -p dist29+ARCH=$(uname -m)
28-cp target/dist/forge dist/forge30+cp target/dist/forge forge-$ARCH-linux
31+cp target/dist/forge-runner forge-runner-$ARCH-linux
32+sha256sum forge-$ARCH-linux forge-runner-$ARCH-linux > SHA256SUMS
33+mkdir -p dist && cp target/dist/forge dist/forge
29 """34 """
30-artifacts = ["dist/forge"]35+artifacts = ["dist/forge", "forge-*-linux", "SHA256SUMS"]
31 cache = ["target"]36 cache = ["target"]
32 timeout_minutes = 12037 timeout_minutes = 120
38+
39+[release]
40+assets = ["build:forge-*-linux", "build:SHA256SUMS"]