mirror of
https://github.com/MAKS-IT-COM/uscheduler.git
synced 2026-04-01 00:32:10 +02:00
(bugfix): release script fix
This commit is contained in:
parent
4e935ca1e4
commit
a98ca040f7
@ -645,15 +645,25 @@ if (-not $isDevBranch) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Create new release using existing tag
|
# Create new release using existing tag
|
||||||
|
# Write release notes to a temp file to avoid shell interpretation issues with special characters
|
||||||
|
$notesFilePath = Join-Path $releaseDir "release-notes-temp.md"
|
||||||
|
[System.IO.File]::WriteAllText($notesFilePath, $releaseNotes, [System.Text.UTF8Encoding]::new($false))
|
||||||
|
|
||||||
$ghArgs = @(
|
$ghArgs = @(
|
||||||
"release", "create", $tag, $zipPath
|
"release", "create", $tag, $zipPath
|
||||||
"--repo", $repo
|
"--repo", $repo
|
||||||
"--title", $releaseName
|
"--title", $releaseName
|
||||||
"--notes", $releaseNotes
|
"--notes-file", $notesFilePath
|
||||||
)
|
)
|
||||||
& gh @ghArgs
|
& gh @ghArgs
|
||||||
|
$ghExitCode = $LASTEXITCODE
|
||||||
|
|
||||||
if ($LASTEXITCODE -ne 0) {
|
# Cleanup temp notes file
|
||||||
|
if (Test-Path $notesFilePath) {
|
||||||
|
Remove-Item $notesFilePath -Force
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($ghExitCode -ne 0) {
|
||||||
Write-Error "Failed to create GitHub release for tag $tag."
|
Write-Error "Failed to create GitHub release for tag $tag."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user