diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 8f5359b..e6ca240 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -94,7 +94,12 @@ jobs: shell: powershell run: | $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 uses: akkuman/gitea-release-action@5a83c90484ef4355121df5eb60558c8ce66e81ac with: diff --git a/scripts/release/package-velopack.ps1 b/scripts/release/package-velopack.ps1 index 8b41f1b..50dd536 100644 --- a/scripts/release/package-velopack.ps1 +++ b/scripts/release/package-velopack.ps1 @@ -66,6 +66,7 @@ $publishArgs = @( Write-Host "dotnet publish..." -ForegroundColor Cyan if (-not $WhatIf) { & dotnet $publishArgs + if ($LASTEXITCODE -ne 0) { throw "dotnet publish failed ($LASTEXITCODE)" } } else { Write-Host "[WhatIf] dotnet $publishArgs" } @@ -85,6 +86,7 @@ $vpkArgs = @( Write-Host "vpk pack..." -ForegroundColor Cyan if (-not $WhatIf) { & dotnet tool run vpk $vpkArgs + if ($LASTEXITCODE -ne 0) { throw "vpk pack failed ($LASTEXITCODE)" } } else { Write-Host "[WhatIf] dotnet tool run vpk $vpkArgs" }