From 1524271be7f9746be30cc9643e3fd662782c9d54 Mon Sep 17 00:00:00 2001 From: benya Date: Sun, 15 Feb 2026 17:31:37 +0300 Subject: [PATCH] ci(release): write outputs/env as utf8 no bom for powershell --- .gitea/workflows/release.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 631f221..0fce9a8 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -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