Skip to content

Commit

Permalink
chore: add zip format in a Windows release assets
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Jan 20, 2025
1 parent 4dc7c71 commit 539e64a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ jobs:
####### reduce binary size by removing debug symbols #######
BINARY_NAME=${{ matrix.binary-name }}${{ matrix.binary-postfix }}
echo "BINARY_NAME=$BINARY_NAME" >> "$GITHUB_ENV"
if [[ ${{ matrix.target }} == aarch64-unknown-linux-gnu ]]; then
GCC_PREFIX="aarch64-linux-gnu-"
Expand All @@ -115,6 +116,7 @@ jobs:
########## create tar.gz ##########
RELEASE_NAME=${{ matrix.binary-name }}-${GITHUB_REF/refs\/tags\//}-${{ matrix.os-name }}-${{ matrix.architecture }}
echo "RELEASE_NAME=$RELEASE_NAME" >> "$GITHUB_ENV"
tar czvf $RELEASE_NAME.tar.gz $BINARY_NAME
Expand All @@ -126,12 +128,20 @@ jobs:
else
shasum -a 256 $RELEASE_NAME.tar.gz > $RELEASE_NAME.sha256
fi
- name: Packaging with zip format
if: runner.os == 'Windows'
working-directory: 'target/${{ matrix.target }}/release'
run: |
Compress-Archive -Path "$env:BINARY_NAME" -Destination "$($env:RELEASE_NAME).zip"
(Get-FileHash "$($env:RELEASE_NAME).zip" -Algorithm SHA256).Hash.ToLower() > "$($env:RELEASE_NAME).zip.sha256"
- name: Releasing assets
uses: softprops/action-gh-release@v1
with:
files: |
target/${{ matrix.target }}/release/${{ matrix.binary-name }}-*.tar.gz
target/${{ matrix.target }}/release/${{ matrix.binary-name }}-*.zip
target/${{ matrix.target }}/release/${{ matrix.binary-name }}-*.sha256
env:
Expand Down

0 comments on commit 539e64a

Please sign in to comment.