File tree Expand file tree Collapse file tree 1 file changed +59
-0
lines changed
Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build Python dev files for Windows
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches :
7+ - python_dev
8+
9+ permissions :
10+ contents : write
11+
12+ jobs :
13+ build :
14+ runs-on : windows-latest
15+
16+ strategy :
17+ matrix :
18+ python-version : [3.12.10]
19+
20+ steps :
21+ - name : Set up environment
22+ run : |
23+ echo "PYVER=${{ matrix.python-version }}" >> $env:GITHUB_ENV
24+ echo "ZIP_NAME=python-${{ matrix.python-version }}-dev.zip" >> $env:GITHUB_ENV
25+
26+
27+ - name : Install official Python
28+ shell : pwsh
29+ run : |
30+ choco install python --version=${{ matrix.python-version }} -y --force --no-progress
31+ $installPath = (Get-Command python).Path | Split-Path -Parent
32+ echo "PYTHON_PATH=$installPath" >> $env:GITHUB_ENV
33+ echo "Installed Python at: $installPath"
34+
35+ - name : Collect include and libs
36+ shell : pwsh
37+ run : |
38+ $outDir = "output"
39+ mkdir $outDir -Force
40+ xcopy "${env:PYTHON_PATH}\include" "$outDir\include" /E /I /H /K /Y
41+ xcopy "${env:PYTHON_PATH}\libs" "$outDir\libs" /E /I /H /K /Y
42+ Compress-Archive -Path "$outDir\*" -DestinationPath ${env:ZIP_NAME}
43+ echo "Created ${env:ZIP_NAME}"
44+
45+ - name : Upload artifact
46+ uses : actions/upload-artifact@v4
47+ with :
48+ name : ${{ env.ZIP_NAME }}
49+ path : ${{ env.ZIP_NAME }}
50+
51+ - name : Upload to release
52+ uses : softprops/action-gh-release@v2
53+ with :
54+ tag_name : python_dev_release
55+ name : Python dev files for Windows
56+ draft : true
57+ preserve_order : true
58+ overwrite_files : true
59+ files : ${{ env.ZIP_NAME }}
You can’t perform that action at this time.
0 commit comments