ci(release): use preinstalled Python on self-hosted windows runner
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user