Skip to content

Commit 5e2987b

Browse files
authored
Create build-windows.yml
1 parent 38adb84 commit 5e2987b

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# .github/workflows/build-windows.yml
2+
name: CI
3+
4+
on:
5+
push:
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-installer:
10+
runs-on: windows-latest
11+
12+
steps:
13+
- name: 下载 Python 源码包
14+
run: |
15+
Invoke-WebRequest `
16+
-Uri https://www.python.org/ftp/python/3.12.11/Python-3.12.11.tgz `
17+
-OutFile Python-3.12.11.tgz
18+
19+
- name: 解压源码
20+
shell: bash
21+
run: |
22+
mkdir python-src
23+
tar -xzf Python-3.12.11.tgz -C python-src --strip-components=1
24+
25+
- name: 安装 MSI 构建依赖
26+
working-directory: python-src/Tools/msi
27+
shell: powershell
28+
run: .\get_externals.bat
29+
30+
- name: 编译并生成安装包布局 (x64)
31+
working-directory: python-src/Tools/msi
32+
shell: powershell
33+
run: .\build.bat -x64
34+
35+
- name: 收集并上传安装程序产物
36+
uses: actions/upload-artifact@v3
37+
with:
38+
name: python-3.12.11-win-amd64-installer
39+
retention-days: 1
40+
path: |
41+
python-src/PCbuild/amd64/en-us/*.exe
42+
python-src/PCbuild/amd64/en-us/*.msi
43+
python-src/PCbuild/amd64/en-us/*.cab

0 commit comments

Comments
 (0)