From 430d5d40fc8e0a072853372162abce59cabb6ffe Mon Sep 17 00:00:00 2001 From: amd64fox <62529699+amd64fox@users.noreply.github.com> Date: Fri, 14 Nov 2025 01:07:28 +0300 Subject: [PATCH] replace deprecated set-output with GITHUB_OUTPUT --- .github/workflows/version-check.yml | 2 +- get-build-info.ps1 | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml index 31999e9..041edee 100644 --- a/.github/workflows/version-check.yml +++ b/.github/workflows/version-check.yml @@ -56,7 +56,7 @@ jobs: if ($win64Url) { ./get-build-info.ps1 -Url $win64Url } else { - echo "::set-output name=build_type::false" + "build_type=false" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append } send-to-gas: diff --git a/get-build-info.ps1 b/get-build-info.ps1 index 6702a12..c83d2b9 100644 --- a/get-build-info.ps1 +++ b/get-build-info.ps1 @@ -22,25 +22,28 @@ function Find-BuildInfo { $buildType = $match.Groups[1].Value Write-Output "Тип билда: $buildType" $found = $true - echo "::set-output name=build_type::$buildType" + # Записываем вывод в файл окружения + "build_type=$buildType" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append + # Прерываем цикл после первого найденного совпадения break } } if (-not $found) { Write-Output "Билд не найден" - echo "::set-output name=build_type::false" + "build_type=false" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append } } catch { Write-Error "Ошибка при чтении файла: $_" - echo "::set-output name=build_type::false" + "build_type=false" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append } } } function Download-And-Unpack-Spotify { [CmdletBinding()] + # Параметр $Url теперь передается из области видимости скрипта $tempPath = Join-Path ([System.IO.Path]::GetTempPath()) "spotify" $destinationPath = Join-Path $tempPath "unpacked" @@ -72,12 +75,12 @@ function Download-And-Unpack-Spotify { } else { Write-Error "Файлы Spotify.dll и Spotify.exe не найдены в $destinationPath" - echo "::set-output name=build_type::false" + "build_type=false" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append } } catch { Write-Error "Произошла ошибка: $_" - echo "::set-output name=build_type::false" + "build_type=false" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append } } @@ -86,5 +89,5 @@ if (-not [string]::IsNullOrEmpty($Url)) { Download-And-Unpack-Spotify } else { Write-Error "URL не был предоставлен." - echo "::set-output name=build_type::false" + "build_type=false" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append } \ No newline at end of file