Skip to content

Commit e5b710c

Browse files
committed
修复打包了一整个msys2的问题
1 parent 24f78b5 commit e5b710c

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,18 @@ jobs:
143143
set -ex
144144
cd _build
145145
146+
# 创建专用打包目录
147+
_build_root="${PWD}"
148+
mkdir -p pkgdir
149+
146150
# 获取分支名称 (示例:mingw-v3.12.10)
147151
_branch_name=$(git rev-parse --abbrev-ref HEAD)
148152
# 构建目录名称
149153
_pkg_suffix="${{ matrix.msystem }}-${{ matrix.build_type.optimization }}"
150154
[[ "${{ matrix.build_type.link_type }}" == "static" ]] && _pkg_suffix+="-static"
151-
pkgdir="python-${_branch_name}-${_pkg_suffix}"
155+
pkgdir="pkgdir/python-${_branch_name}-${_pkg_suffix}" # ← 修改路径
152156
153-
make -j8 install DESTDIR="${pkgdir}"
157+
make -j8 install DESTDIR="${_build_root}/${pkgdir}" # ← 修改安装路径
154158
155159
# Fix shebangs
156160
_pybasever=$(./python.exe -c "import sys; print(f'{sys.version_info[0]}.{sys.version_info[1]}');")
@@ -187,9 +191,8 @@ jobs:
187191
if: always()
188192
shell: msys2 {0}
189193
run: |
190-
cd cpython-mingw
191-
cd _build
192-
7z a -t7z -mx=9 python-${_branch_name}-${{ matrix.msystem }}-${{ matrix.build_type.optimization }}-${{ matrix.build_type.link_type }}.7z ${pkgdir}/
194+
cd cpython-mingw/_build
195+
7z a -t7z -mx=9 python-${_branch_name}-${{ matrix.msystem }}-${{ matrix.build_type.optimization }}-${{ matrix.build_type.link_type }}.7z "pkgdir/*" # ← 修改压缩路径
193196
194197
- name: 上传
195198
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)