Publish a release with binaries and SHA256SUMS on v* tags
Browse files at this commitb6b26bb2d5c7c8fde36d9a63581d297e4f0346daParent: 51b2bbf- ci
- publish a release with binaries and SHA256SUMS on v* tags
1 changed file +12 -4
- .forge/ci.toml +12 -4
.forge/ci.tomlmodified+12 -4
| @@ -1,11 +1,13 @@ | ||
| 1 | 1 | # CI for forge itself. Format: docs/ci.md, parser: crates/forge-ci/src/config.rs. |
| 2 | 2 | # |
| 3 | 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 | 6 | [on] |
| 6 | 7 | push = ["main"] |
| 7 | 8 | pull_request = true |
| 8 | 9 | manual = true |
| 10 | +tags = ["v*"] | |
| 9 | 11 | |
| 10 | 12 | [jobs.test] |
| 11 | 13 | image = "docker.io/library/rust:1" |
| @@ -23,10 +25,16 @@ needs = ["test"] | ||
| 23 | 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 | 26 | env = { CARGO_BUILD_JOBS = "1", CARGO_INCREMENTAL = "0" } |
| 25 | 27 | 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 | |
| 29 | 34 | """ |
| 30 | -artifacts = ["dist/forge"] | |
| 35 | +artifacts = ["dist/forge", "forge-*-linux", "SHA256SUMS"] | |
| 31 | 36 | cache = ["target"] |
| 32 | 37 | timeout_minutes = 120 |
| 38 | + | |
| 39 | +[release] | |
| 40 | +assets = ["build:forge-*-linux", "build:SHA256SUMS"] |