ci: fail loud on velopack errors, guard release assets
This commit is contained in:
2 files changed
+8
-1
No files matched your search
@@ -94,7 +94,12 @@ jobs:
|
|||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
& powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/release/package-velopack.ps1
|
& "$env:GITHUB_WORKSPACE/scripts/release/package-velopack.ps1"
|
||||||
|
if ($LASTEXITCODE -ne 0) { throw "package-velopack.ps1 failed ($LASTEXITCODE)" }
|
||||||
|
$out = Join-Path $env:GITHUB_WORKSPACE "artifacts/velopack/win-x64-stable"
|
||||||
|
foreach ($p in @("*.exe", "*.zip", "*.json", "*.nupkg")) {
|
||||||
|
if (@(Get-ChildItem -Path (Join-Path $out $p) -File -ErrorAction SilentlyContinue).Count -eq 0) { throw "Velopack output missing pattern $p in $out" }
|
||||||
|
}
|
||||||
- name: Create Gitea Release with assets
|
- name: Create Gitea Release with assets
|
||||||
uses: akkuman/gitea-release-action@5a83c90484ef4355121df5eb60558c8ce66e81ac
|
uses: akkuman/gitea-release-action@5a83c90484ef4355121df5eb60558c8ce66e81ac
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ $publishArgs = @(
|
|||||||
Write-Host "dotnet publish..." -ForegroundColor Cyan
|
Write-Host "dotnet publish..." -ForegroundColor Cyan
|
||||||
if (-not $WhatIf) {
|
if (-not $WhatIf) {
|
||||||
& dotnet $publishArgs
|
& dotnet $publishArgs
|
||||||
|
if ($LASTEXITCODE -ne 0) { throw "dotnet publish failed ($LASTEXITCODE)" }
|
||||||
} else {
|
} else {
|
||||||
Write-Host "[WhatIf] dotnet $publishArgs"
|
Write-Host "[WhatIf] dotnet $publishArgs"
|
||||||
}
|
}
|
||||||
@@ -85,6 +86,7 @@ $vpkArgs = @(
|
|||||||
Write-Host "vpk pack..." -ForegroundColor Cyan
|
Write-Host "vpk pack..." -ForegroundColor Cyan
|
||||||
if (-not $WhatIf) {
|
if (-not $WhatIf) {
|
||||||
& dotnet tool run vpk $vpkArgs
|
& dotnet tool run vpk $vpkArgs
|
||||||
|
if ($LASTEXITCODE -ne 0) { throw "vpk pack failed ($LASTEXITCODE)" }
|
||||||
} else {
|
} else {
|
||||||
Write-Host "[WhatIf] dotnet tool run vpk $vpkArgs"
|
Write-Host "[WhatIf] dotnet tool run vpk $vpkArgs"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user