Skip to content

Commit

Permalink
Split compressions steps between OS types
Browse files Browse the repository at this point in the history
  • Loading branch information
alexroan committed Jun 4, 2024
1 parent e43640c commit b1c674a
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions .github/workflows/release2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b1c674a

Please sign in to comment.