ci(release): write outputs/env as utf8 no bom for powershell
All checks were successful
Desktop CI / tests (push) Successful in 13s
Desktop Release / release (push) Successful in 2m5s

This commit is contained in:
2026-02-15 17:31:37 +03:00
parent 561cf43e09
commit 1524271be7

View File

@@ -42,8 +42,9 @@ jobs:
id: extract_version
shell: powershell
run: |
$version = python -c "from app_version import APP_VERSION; print(APP_VERSION)"
"version=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
$version = (python -c "from app_version import APP_VERSION; print(APP_VERSION)").Trim()
$utf8NoBom = New-Object System.Text.UTF8Encoding($false)
[System.IO.File]::AppendAllText($env:GITHUB_OUTPUT, "version=$version`n", $utf8NoBom)
Write-Host "Detected version: $version"
- name: Stop if version already released
@@ -54,12 +55,13 @@ jobs:
git show-ref --tags --quiet --verify "refs/tags/$version"
$tagExists = ($LASTEXITCODE -eq 0)
$global:LASTEXITCODE = 0
$utf8NoBom = New-Object System.Text.UTF8Encoding($false)
if ($tagExists) {
Write-Host "Version $version already released, stopping job."
"CONTINUE=false" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
[System.IO.File]::AppendAllText($env:GITHUB_ENV, "CONTINUE=false`n", $utf8NoBom)
} else {
Write-Host "Version $version not released yet, continuing workflow..."
"CONTINUE=true" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
[System.IO.File]::AppendAllText($env:GITHUB_ENV, "CONTINUE=true`n", $utf8NoBom)
}
exit 0