From de6c6dd28f9e80b819d132675b49dc60f0a0361a Mon Sep 17 00:00:00 2001 From: mike Date: Mon, 22 Jul 2024 15:28:14 +0200 Subject: [PATCH] feat: refresh env --- .github/workflows/release.yml | 18 ++++++++++++++---- .github/workflows/test.yml | 3 ++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4e80389..d6dd77f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,7 +53,10 @@ jobs: if: matrix.platform.runner == 'macos-latest' - name: Install ghostscript (for windows) - run: choco install ghostscript + run: | + choco install ghostscript --yes --no-progress + Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 + refreshenv if: matrix.platform.runner == 'windows-latest' - name: Run tests @@ -73,9 +76,16 @@ jobs: dirname="$binary_name-${{ env.VERSION }}-${{ matrix.platform.target }}" mkdir "$dirname" - mv "target/${{ matrix.platform.target }}/release/$binary_name" "$dirname" - tar -czf "$dirname.tar.gz" "$dirname" - echo "ASSET=$dirname.tar.gz" >> $GITHUB_ENV + + if [ "${{ matrix.platform.runner }}" = "windows-latest" ]; then + mv "target/${{ matrix.platform.target }}/release/$binary_name.exe" "$dirname" + 7z a "$dirname.zip" "$dirname" + echo "ASSET=$dirname.zip" >> $GITHUB_ENV + else + mv "target/${{ matrix.platform.target }}/release/$binary_name" "$dirname" + tar -czf "$dirname.tar.gz" "$dirname" + echo "ASSET=$dirname.tar.gz" >> $GITHUB_ENV + fi - name: Upload the binaries uses: softprops/action-gh-release@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 354743d..9cb6e9d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,8 +53,9 @@ jobs: if: matrix.platform.runner == 'macos-latest' - name: Install ghostscript (for windows) - run: | + run: | choco install ghostscript --yes --no-progress + Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 refreshenv if: matrix.platform.runner == 'windows-latest'