Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
nomyfan committed Feb 19, 2024
1 parent 09384cf commit 837fdcd
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,14 @@ jobs:
shell: pwsh
run: |
$isWin = "${{ matrix.os }}".StartsWith("windows-")
$releaseFolder = Join-Path $(Get-Location) -ChildPath target -AdditionalChildPath ${{ matrix.target }},release
$binaryPath = Join-Path -Path $releaseFolder -ChildPath $($isWin ? "als.exe" : "als")
$archivePath = Join-Path -Path $releaseFolder -ChildPath $($isWin ? "als.${{ matrix.target }}.zip" : "als.${{ matrix.target }}.tar.gz")
$archivePath = $isWin ? ".\target\${{ matrix.target }}\release\als.${{ matrix.target }}.zip" : "./target/${{ matrix.target }}/release/als.${{ matrix.target }}.tar.gz"
echo "ARCHIVE_PATH=$archivePath" >> $env:GITHUB_ENV
if ($isWin) {
Compress-Archive -Path $binaryPath -DestinationPath $archivePath
Compress-Archive -Path .\target\${{ matrix.target }}\release\als.exe -DestinationPath $archivePath
} else {
tar -Pczf $archivePath $binaryPath
tar -czf $archivePath ./target/${{ matrix.target }}/release/als
}
- name: List archive
Expand Down

0 comments on commit 837fdcd

Please sign in to comment.