diff --git a/release.ps1 b/release.ps1 index f6433e0..1e5b2e6 100644 --- a/release.ps1 +++ b/release.ps1 @@ -174,9 +174,11 @@ if ($DryRun) { $headers = @{ Authorization = "token $env:GITEA_TOKEN" } # Extract notes from CHANGELOG.md +# IMPORTANT: PowerShell 5.1 Get-Content defaults to ANSI; use .NET API for UTF-8 (Korean). $notes = "Release $Version" if (Test-Path CHANGELOG.md) { - $changelog = Get-Content CHANGELOG.md -Raw + $changelogPath = (Resolve-Path CHANGELOG.md).Path + $changelog = [System.IO.File]::ReadAllText($changelogPath, [System.Text.Encoding]::UTF8) $pattern = "## \[$([regex]::Escape($VersionRaw))\][\s\S]*?(?=`n## \[|\z)" $regexMatch = [regex]::Match($changelog, $pattern) if ($regexMatch.Success) { $notes = $regexMatch.Value.Trim() }