From dd9da1ad18a965a8a8bf4aab615a7921fbf5535b Mon Sep 17 00:00:00 2001 From: Nick Carton Date: Mon, 18 Nov 2024 10:29:51 +0100 Subject: [PATCH] correct strip binary command --- .github/workflows/rust-publish.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust-publish.yml b/.github/workflows/rust-publish.yml index d33119c..d749440 100644 --- a/.github/workflows/rust-publish.yml +++ b/.github/workflows/rust-publish.yml @@ -120,11 +120,20 @@ jobs: if: runner.os != 'Windows' run: | if [ "${{ matrix.target }}" != "aarch64-apple-darwin" ]; then - if [ -n "${{ matrix.linker }}" ]; then - ${{ matrix.target }}-strip target/${{ matrix.target }}/release/bping - else - strip target/${{ matrix.target }}/release/bping - fi + case "${{ matrix.target }}" in + "aarch64-unknown-linux-gnu") + aarch64-linux-gnu-strip target/${{ matrix.target }}/release/bping + ;; + "arm-unknown-linux-gnueabi") + arm-linux-gnueabi-strip target/${{ matrix.target }}/release/bping + ;; + "armv7-unknown-linux-gnueabihf") + arm-linux-gnueabihf-strip target/${{ matrix.target }}/release/bping + ;; + *) + strip target/${{ matrix.target }}/release/bping + ;; + esac fi - name: Upload binaries to release