ci: persist publish-finish exit code to side-channel + force explicit exit
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -282,10 +282,14 @@ jobs:
|
|||||||
Write-Host $_.ScriptStackTrace
|
Write-Host $_.ScriptStackTrace
|
||||||
$code = 1
|
$code = 1
|
||||||
} finally {
|
} finally {
|
||||||
Stop-Transcript
|
try { Stop-Transcript -ErrorAction SilentlyContinue } catch {}
|
||||||
}
|
}
|
||||||
Write-Host "Single-step exit code: $code"
|
# Persist exit code to a side-channel file so we can inspect even if
|
||||||
exit $code
|
# the transcript got closed before the value was written.
|
||||||
|
"code=$code at $(Get-Date)" | Out-File -FilePath publish-finish.log -Encoding ASCII
|
||||||
|
# Force explicit exit -- ignore any trailing $LASTEXITCODE noise from
|
||||||
|
# native commands above.
|
||||||
|
if ($code -ne 0) { exit $code } else { exit 0 }
|
||||||
|
|
||||||
- name: Pack + upload publish.tar.gz
|
- name: Pack + upload publish.tar.gz
|
||||||
if: success()
|
if: success()
|
||||||
@@ -318,7 +322,7 @@ jobs:
|
|||||||
$pair = "$($env:REG_USER):$($env:REG_PASS)"
|
$pair = "$($env:REG_USER):$($env:REG_PASS)"
|
||||||
$auth = "Basic " + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes($pair))
|
$auth = "Basic " + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes($pair))
|
||||||
$base = "https://gitea.dev.marcus-law.co.il/api/packages/espocrm-extensions/generic/outlook-addin-publish-log/run-$env:RUN_ID"
|
$base = "https://gitea.dev.marcus-law.co.il/api/packages/espocrm-extensions/generic/outlook-addin-publish-log/run-$env:RUN_ID"
|
||||||
foreach ($f in @('publish.console.log','publish-msbuild.log','src/OutlookAddin/OutlookAddin.csproj')) {
|
foreach ($f in @('publish.console.log','publish-msbuild.log','publish-finish.log','src/OutlookAddin/OutlookAddin.csproj')) {
|
||||||
if (Test-Path $f) {
|
if (Test-Path $f) {
|
||||||
$name = (Split-Path $f -Leaf)
|
$name = (Split-Path $f -Leaf)
|
||||||
Write-Host "PUT $base/$name"
|
Write-Host "PUT $base/$name"
|
||||||
|
|||||||
Reference in New Issue
Block a user