cargo-matrix 0.4.6

Run feature matrices against cargo commands that support feature lists
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Runs inside the repomon windows-build job (see .repomon/release.toml).
# Builds the native x86_64-pc-windows-msvc binary and packages it exactly
# like the old (GitHub Actions) release.yml's Windows packaging step did: a
# single-binary zip named cargo-matrix-<target>-v<version>.zip.

$ErrorActionPreference = "Stop"

$t = "x86_64-pc-windows-msvc"
$version = (git describe --tags --exact-match) -replace '^v', ''

cargo build --release --locked --target $t
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }

Copy-Item "target\$t\release\cargo-matrix.exe" "cargo-matrix.exe"
Compress-Archive -Path cargo-matrix.exe -DestinationPath "cargo-matrix-$t-v$version.zip"
Remove-Item cargo-matrix.exe