From c8da0f9191600fbf3199b73ba7ffefa2035a65d4 Mon Sep 17 00:00:00 2001 From: benya Date: Sun, 15 Feb 2026 17:20:42 +0300 Subject: [PATCH] ci(release): use preinstalled Python on self-hosted windows runner --- .gitea/workflows/release.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 88be585..9250457 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -16,10 +16,21 @@ jobs: fetch-depth: 0 tags: true - - name: Set up Python - uses: https://git.daemonlord.ru/actions/setup-python@v5 - with: - python-version: "3.13" + - name: Ensure Python 3.13 + shell: powershell + run: | + if (Get-Command python -ErrorAction SilentlyContinue) { + python --version + } elseif (Get-Command py -ErrorAction SilentlyContinue) { + $pyExe = py -3.13 -c "import sys; print(sys.executable)" + if (-not $pyExe) { + throw "Python 3.13 launcher is available, but interpreter was not found." + } + Split-Path $pyExe | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + python --version + } else { + throw "Python is not installed on runner. Install Python 3.13 and restart runner service." + } - name: Install dependencies shell: bash