From 342fb57d143e335acc53e37b1855912b3ca537b1 Mon Sep 17 00:00:00 2001 From: Filip Tibell Date: Fri, 30 Jun 2023 19:53:19 +0200 Subject: [PATCH] Fix compilation target in release workflow (#701) Fixes macOS aarch64 builds not actually outputting x86 binaries by specifying the `--target` flag during compilation in the release workflow. These are the same changes as [this PR in Aftman](https://github.com/LPGhatguy/aftman/pull/34), which had the same issue, and uses the same workflow. --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c4833c8d..5cc781b0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -116,7 +116,7 @@ jobs: version: 'v0.2.6' - name: Build Release - run: cargo build --release --locked --verbose + run: cargo build --release --locked --verbose --target ${{ matrix.target }} env: # Build into a known directory so we can find our build artifact more # easily. @@ -132,11 +132,11 @@ jobs: mkdir staging if [ "${{ matrix.host }}" = "windows" ]; then - cp "output/release/$BIN.exe" staging/ + cp "output/${{ matrix.target }}/release/$BIN.exe" staging/ cd staging 7z a ../release.zip * else - cp "output/release/$BIN" staging/ + cp "output/${{ matrix.target }}/release/$BIN" staging/ cd staging zip ../release.zip * fi