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 @@
11 # CI for forge itself. Format: docs/ci.md, parser: crates/forge-ci/src/config.rs.
22 #
33 # 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.
45
56 [on]
67 push = ["main"]
78 pull_request = true
89 manual = true
10+tags = ["v*"]
911
1012 [jobs.test]
1113 image = "docker.io/library/rust:1"
@@ -23,10 +25,16 @@ needs = ["test"]
2325 # 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.
2426 env = { CARGO_BUILD_JOBS = "1", CARGO_INCREMENTAL = "0" }
2527 run = """
26-cargo build --profile dist -p forge-web
27-mkdir -p dist
28-cp target/dist/forge dist/forge
28+cargo build --profile dist -p forge-web -p forge-runner
29+ARCH=$(uname -m)
30+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
2934 """
30-artifacts = ["dist/forge"]
35+artifacts = ["dist/forge", "forge-*-linux", "SHA256SUMS"]
3136 cache = ["target"]
3237 timeout_minutes = 120
38+
39+[release]
40+assets = ["build:forge-*-linux", "build:SHA256SUMS"]