mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-06 03:25:23 +00:00
chore: add zip format in a Windows release assets (#298)
Resolves GH-296 without replacing current tar.gz for backward compatibility I have tested with similar code, then the workflow uploads files like https://github.com/kachick/television/releases/tag/0.999.999
This commit is contained in:
parent
4dc7c7129f
commit
5750531cb2
10
.github/workflows/cd.yml
vendored
10
.github/workflows/cd.yml
vendored
@ -104,6 +104,7 @@ jobs:
|
|||||||
####### reduce binary size by removing debug symbols #######
|
####### reduce binary size by removing debug symbols #######
|
||||||
|
|
||||||
BINARY_NAME=${{ matrix.binary-name }}${{ matrix.binary-postfix }}
|
BINARY_NAME=${{ matrix.binary-name }}${{ matrix.binary-postfix }}
|
||||||
|
echo "BINARY_NAME=$BINARY_NAME" >> "$GITHUB_ENV"
|
||||||
if [[ ${{ matrix.target }} == aarch64-unknown-linux-gnu ]]; then
|
if [[ ${{ matrix.target }} == aarch64-unknown-linux-gnu ]]; then
|
||||||
|
|
||||||
GCC_PREFIX="aarch64-linux-gnu-"
|
GCC_PREFIX="aarch64-linux-gnu-"
|
||||||
@ -115,6 +116,7 @@ jobs:
|
|||||||
########## create tar.gz ##########
|
########## create tar.gz ##########
|
||||||
|
|
||||||
RELEASE_NAME=${{ matrix.binary-name }}-${GITHUB_REF/refs\/tags\//}-${{ matrix.os-name }}-${{ matrix.architecture }}
|
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
|
tar czvf $RELEASE_NAME.tar.gz $BINARY_NAME
|
||||||
|
|
||||||
@ -126,12 +128,20 @@ jobs:
|
|||||||
else
|
else
|
||||||
shasum -a 256 $RELEASE_NAME.tar.gz > $RELEASE_NAME.sha256
|
shasum -a 256 $RELEASE_NAME.tar.gz > $RELEASE_NAME.sha256
|
||||||
fi
|
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
|
- name: Releasing assets
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
|
|
||||||
target/${{ matrix.target }}/release/${{ matrix.binary-name }}-*.tar.gz
|
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
|
target/${{ matrix.target }}/release/${{ matrix.binary-name }}-*.sha256
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user