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 8e3062b commit 09384cf
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,32 +46,28 @@ jobs:
- name: List builds
shell: pwsh
run: |
Get-Location
Get-ChildItem $(Join-Path -Path $(Get-Location) -ChildPath target -AdditionalChildPath ${{ matrix.target }},release)
- name: Archive artifacts
shell: pwsh
run: |
$isWin = "${{ matrix.os }}".StartsWith("windows-")
$binaryName = $isWin ? "als.exe" : "als"
$archiveName = $isWin ? "als.zip" : "als.tar.gz"
$releaseFolder = Join-Path $(Get-Location) -ChildPath target -AdditionalChildPath ${{ matrix.target }},release
$binaryPath = Join-Path -Path $releaseFolder -ChildPath $binaryName
$archivePath = Join-Path -Path $releaseFolder -ChildPath $archiveName
$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")
echo "ARCHIVE_PATH=$archivePath" >> $env:GITHUB_ENV
if ($isWin) {
Compress-Archive -Path $binaryPath -DestinationPath $archivePath
} else {
tar czf $archivePath $binaryPath
tar -Pczf $archivePath $binaryPath
}
- name: List archive
shell: pwsh
run: |
Get-Location
Get-ChildItem $(Join-Path -Path $(Get-Location) -ChildPath target -AdditionalChildPath ${{ matrix.target }},release)
- name: Release
Expand Down

0 comments on commit 09384cf

Please sign in to comment.