From 4acbd891d592b45a21f993da3f515657d2487310 Mon Sep 17 00:00:00 2001 From: "hinto.janai" Date: Sat, 15 Jul 2023 11:51:15 -0400 Subject: [PATCH] ci: tar before zip zip doesn't retain the executable bit, so macos/linux binaries can't be executed. this `tar`'s the binaries before uploading the artifact. --- .github/workflows/ci.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3caafff..10cacf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,10 +51,13 @@ jobs: if [ "$RUNNER_OS" == "macOS" ]; then cargo bundle --all-features --release cargo bundle --all-features --release --target aarch64-apple-darwin - chmod +x target/release/bundle/osx/Gupax.app/Contents/MacOS/gupax - chmod +x target/aarch64-apple-darwin/release/bundle/osx/Gupax.app/Contents/MacOS/gupax + mv target/release/bundle/osx/Gupax.app Gupax-macos-x64.app + mv target/aarch64-apple-darwin/release/bundle/osx/Gupax.app Gupax-macos-arm64.app + tar -cf macos.tar Gupax-macos-arm64.app Gupax-macos-x64.app elif [ "$RUNNER_OS" == "Linux" ]; then cargo build --all-features --release --target x86_64-unknown-linux-gnu + mv target/x86_64-unknown-linux-gnu/release/gupax . + tar -cf linux.tar gupax else cargo build --all-features --release fi @@ -67,23 +70,16 @@ jobs: name: windows path: target/release/gupax.exe - - name: Archive (macOS-x64) + - name: Archive if: ${{ runner.os == 'macOS' }} uses: actions/upload-artifact@v3 with: - name: macos-x64 - path: target/release/bundle/osx/Gupax.app - - - name: Archive (macOS-arm64) - if: ${{ runner.os == 'macOS' }} - uses: actions/upload-artifact@v3 - with: - name: macos-arm64 - path: target/aarch64-apple-darwin/release/bundle/osx/Gupax.app + name: macos + path: macos.tar - name: Archive (Linux) if: ${{ runner.os == 'Linux' }} uses: actions/upload-artifact@v3 with: name: linux - path: target/x86_64-unknown-linux-gnu/release/gupax + path: linux.tar