From b1c674af995d39095293a7a614f733919b8f9702 Mon Sep 17 00:00:00 2001 From: Alex Roan Date: Tue, 4 Jun 2024 13:35:03 +0100 Subject: [PATCH] Split compressions steps between OS types --- .github/workflows/release2.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release2.yml b/.github/workflows/release2.yml index 80b07d655..597e69a09 100644 --- a/.github/workflows/release2.yml +++ b/.github/workflows/release2.yml @@ -60,15 +60,21 @@ jobs: mv "${BIN_OUTPUT}" "./${BIN_RELEASE_VERSIONED}" echo "BIN_RELEASE_VERSIONED=${BIN_RELEASE_VERSIONED}" >> $GITHUB_ENV - - name: Compress Binary - run: | - mkdir -p compressed - tar -czvf compressed/${{ env.BIN_RELEASE_VERSIONED }}.tar.gz ${{ env.BIN_RELEASE_VERSIONED }} - if [ "${{ matrix.runner }}" = "windows-latest" ]; then - echo "COMPRESSED_BINARY=compressed/${{ env.BIN_RELEASE_VERSIONED }}.tar.gz" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append - else - echo "COMPRESSED_BINARY=compressed/${{ env.BIN_RELEASE_VERSIONED }}.tar.gz" >> $GITHUB_ENV - fi + - name: Compress Binary (Unix) + if: runner.os != 'Windows' + run: | + mkdir -p compressed + tar -czvf compressed/${{ env.BIN_RELEASE_VERSIONED }}.tar.gz ${{ env.BIN_RELEASE_VERSIONED }} + echo "COMPRESSED_BINARY=compressed/${{ env.BIN_RELEASE_VERSIONED }}.tar.gz" >> $GITHUB_ENV + shell: bash + + - name: Compress Binary (Windows) + if: runner.os == 'Windows' + run: | + mkdir compressed + tar -czvf compressed/${{ env.BIN_RELEASE_VERSIONED }}.tar.gz ${{ env.BIN_RELEASE_VERSIONED }} + echo "COMPRESSED_BINARY=compressed/${{ env.BIN_RELEASE_VERSIONED }}.tar.gz" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append + shell: pwsh - name: Upload Artifact uses: actions/upload-artifact@v2