Skip to content

Commit

Permalink
feat: refresh env
Browse files Browse the repository at this point in the history
  • Loading branch information
mike committed Jul 22, 2024
1 parent 964e9de commit de6c6dd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit de6c6dd

Please sign in to comment.