From 2c05739470ceea5d9eaf9fb276064a1c29f5d4f9 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 27 Jun 2024 11:53:24 +0700 Subject: [PATCH] change compress to tar.gz for linux/mac, update action-gh-release to v2 --- .github/workflows/rust.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0903e98..f7787a5 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -78,15 +78,17 @@ jobs: if [[ "${{ runner.os }}" == "Windows" ]]; then 7z a -tzip wchisp-${{ github.event.release.tag_name }}-${{ matrix.config.arch }}.zip wchisp-${{ matrix.config.arch }} else - zip -r wchisp-${{ github.event.release.tag_name }}-${{ matrix.config.arch }}.zip wchisp-${{ matrix.config.arch }} + tar -czvf wchisp-${{ github.event.release.tag_name }}-${{ matrix.config.arch }}.tar.gz wchisp-${{ matrix.config.arch }} fi shell: bash - name: Upload Release Asset - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 if: github.event_name == 'release' with: + fail_on_unmatched_files: false files: | - wchisp-${{ github.event.release.tag_name }}-${{ matrix.config.arch }}.zip + wchisp-*.tar.gz + wchisp-*.zip nightly-release: needs: build @@ -102,8 +104,12 @@ jobs: run: | ls -R ./ for f in wchisp-*; do - echo "Compressing $f with zip -r $f.zip $f" - zip -r $f.zip $f + echo "Compressing $f" + if [[ $f == wchisp-win* ]]; then + zip -r $f.zip $f + else + tar -czvf $f.tar.gz $f + fi done ls ./ @@ -119,4 +125,5 @@ jobs: body: | This is a nightly binary release of the wchisp command line tool. files: | + wchisp-*.tar.gz wchisp-*.zip