1- # Build multi-arch binaries and publish to GitHub Releases on tag push (e.g. v0.1.0).
2- # Artifacts: Linux (amd64, arm64), Windows (amd64), macOS (amd64, arm64) .
1+ # Build Linux binaries (amd64, arm64) and publish to GitHub Releases on tag push (e.g. v0.1.0).
2+ # Artifacts: Linux x86_64, Linux aarch64 only .
33
44name : Release
55
2424 - target : aarch64-unknown-linux-musl
2525 os : ubuntu-latest
2626 asset : aarch64-linux
27- - target : x86_64-pc-windows-msvc
28- os : windows-latest
29- asset : x86_64-windows
30- - target : x86_64-apple-darwin
31- os : macos-latest
32- asset : x86_64-darwin
33- - target : aarch64-apple-darwin
34- os : macos-latest
35- asset : aarch64-darwin
3627 runs-on : ${{ matrix.os }}
3728 steps :
3829 - uses : actions/checkout@v4
@@ -53,20 +44,13 @@ jobs:
5344 key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
5445 targets : ${{ matrix.target }}
5546
56- - name : Build release binary (Linux musl via cross, others via cargo)
57- run : |
58- if [[ "${{ matrix.target }}" == *-linux-musl ]]; then
59- cross build --release --target ${{ matrix.target }}
60- else
61- cargo build --release --target ${{ matrix.target }}
62- fi
47+ - name : Build release binary
48+ run : cross build --release --target ${{ matrix.target }}
6349
64- - name : Strip binary (Linux/macOS)
65- if : runner.os != 'Windows'
50+ - name : Strip binary
6651 run : strip target/${{ matrix.target }}/release/kubeowler 2>/dev/null || true
6752
68- - name : Prepare archive (Linux/macOS)
69- if : runner.os != 'Windows'
53+ - name : Prepare archive
7054 run : |
7155 VERSION=${GITHUB_REF#refs/tags/}
7256 BIN=target/${{ matrix.target }}/release/kubeowler
7761 cd ..
7862 echo "ASSET_PATH=kubeowler-${VERSION}-${{ matrix.asset }}.tar.gz" >> $GITHUB_ENV
7963
80- - name : Prepare archive (Windows)
81- if : runner.os == 'Windows'
82- shell : pwsh
83- run : |
84- $version = "${{ github.ref_name }}"
85- $bin = "target/${{ matrix.target }}/release/kubeowler.exe"
86- New-Item -ItemType Directory -Force -Path release | Out-Null
87- Copy-Item $bin -Destination release/kubeowler.exe
88- Compress-Archive -Path release/* -DestinationPath "kubeowler-$version-${{ matrix.asset }}.zip" -Force
89- echo "ASSET_PATH=kubeowler-$version-${{ matrix.asset }}.zip" >> $env:GITHUB_ENV
90-
9164 - name : Upload artifact
9265 uses : actions/upload-artifact@v4
9366 with :
0 commit comments