publish.ps1: UTF-8 Encoding fuer API-Body
This commit is contained in:
parent
15e7182c22
commit
d22808497d
1 changed files with 7 additions and 6 deletions
13
publish.ps1
13
publish.ps1
|
|
@ -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 ────────────────────────────────────────────
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue