publish.ps1: UTF-8 Encoding fuer API-Body

This commit is contained in:
administrator 2026-05-12 23:44:30 +02:00
parent 15e7182c22
commit d22808497d

View file

@ -77,16 +77,17 @@ if (-not $Tag) {
}
Write-Host "→ Forgejo-Release $Tag erstellen..."
$headers = @{ 'Authorization' = "token $Token"; 'Content-Type' = 'application/json' }
$body = @{
$headers = @{ 'Authorization' = "token $Token"; 'Content-Type' = 'application/json; charset=utf-8' }
$bodyObj = @{
tag_name = $Tag
name = "HomeStream $version"
body = "Self-contained Release für Windows 10/11 (x64). Keine .NET-Installation nötig."
body = "Self-contained Release fuer Windows 10/11 (x64). Keine .NET-Installation noetig."
draft = $false
prerelease = $false
} | ConvertTo-Json
$release = Invoke-RestMethod -Uri "$ApiBase/releases" -Method Post -Headers $headers -Body $body
}
# Explizit UTF-8 kodieren damit Umlaute korrekt uebertragen werden
$bodyBytes = [System.Text.Encoding]::UTF8.GetBytes(($bodyObj | ConvertTo-Json))
$release = Invoke-RestMethod -Uri "$ApiBase/releases" -Method Post -Headers $headers -Body $bodyBytes
Write-Host " Release-ID: $($release.id)"
# ── 5. ZIP als Asset hochladen ────────────────────────────────────────────