From a98ca040f7250d77d00714c247c9344f69644fcc Mon Sep 17 00:00:00 2001 From: Maksym Sadovnychyy Date: Mon, 16 Feb 2026 21:50:07 +0100 Subject: [PATCH] (bugfix): release script fix --- utils/Release-ToGitHub/Release-ToGitHub.ps1 | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/utils/Release-ToGitHub/Release-ToGitHub.ps1 b/utils/Release-ToGitHub/Release-ToGitHub.ps1 index 69a23b6..149ca81 100644 --- a/utils/Release-ToGitHub/Release-ToGitHub.ps1 +++ b/utils/Release-ToGitHub/Release-ToGitHub.ps1 @@ -645,15 +645,25 @@ if (-not $isDevBranch) { } # 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 = @( "release", "create", $tag, $zipPath "--repo", $repo "--title", $releaseName - "--notes", $releaseNotes + "--notes-file", $notesFilePath ) & 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." exit 1 }