Skip to content

Commit d4b804c

Browse files
committed
Bump setup-python and add Windows Python var
Add PYTHON_WINDOWS_VERSION env var and use it in the Windows job to download/install the matching Python installer instead of hardcoding 3.12.10. Also upgrade actions/setup-python from v5 to v6. These changes make the Windows packaging step configurable and update the setup action to the newer release.
1 parent 08578c6 commit d4b804c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/build-python.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
env:
1010
PYTHON_VERSION: 3.12.12
11+
PYTHON_WINDOWS_VERSION: 3.12.10
1112
PYTHON_VERSION_SHORT: '3.12'
1213

1314
jobs:
@@ -22,7 +23,7 @@ jobs:
2223
uses: actions/checkout@v4
2324

2425
- name: Setup Python
25-
uses: actions/setup-python@v5
26+
uses: actions/setup-python@v6
2627
with:
2728
python-version: ${{ env.PYTHON_VERSION }}
2829

@@ -104,8 +105,8 @@ jobs:
104105
working-directory: windows
105106
shell: cmd
106107
run: |
107-
curl -OL https://www.python.org/ftp/python/3.12.10/python-3.12.10-amd64.exe
108-
start /wait python-3.12.10-amd64.exe /quiet
108+
curl -OL https://www.python.org/ftp/python/${{ env.PYTHON_WINDOWS_VERSION }}/python-${{ env.PYTHON_WINDOWS_VERSION }}-amd64.exe
109+
start /wait python-${{ env.PYTHON_WINDOWS_VERSION }}-amd64.exe /quiet
109110
C:\python312-dist\python -m compileall -b C:\python312-dist\Lib
110111
7z a -xr@exclude.txt python-windows-for-dart-%PYTHON_VERSION_SHORT%.zip C:\python312-dist\*
111112
- uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)