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