test publish.yml

This commit is contained in:
xaoyo 2023-11-27 11:58:32 +08:00
parent c4484f5270
commit 06c15137b2

View File

@ -37,22 +37,12 @@ jobs:
python tests/build_exe.py python tests/build_exe.py
- name: Get package path - name: Get package path
run: | shell: python -c "import site; print(site.getsitepackages()[1])"
$pythonCmd = "python -c ""import site; print(site.getsitepackages()[1])""" id: get_package_path
$package_path = Invoke-Expression -Command $pythonCmd - name: Package with PyInstaller
$version_list_path = "$package_path/pywxdump/version_list.json" shell: |
pyinstaller --onefile --clean --add-data "{{ steps.get_package_path.outputs.stdout }}/pywxdump/version_list.json;pywxdump" --distpath=dist --workpath=build --specpath=build --name=pywxdump dist/tmp.py
# Execute packaging command continue-on-error: true
$cmd = "pyinstaller --onefile --clean --add-data `"$version_list_path;pywxdump`" --distpath=dist --workpath=build --specpath=build --name=pywxdump dist/tmp.py"
Write-Host $cmd
Invoke-Expression -Command $cmd || exit 1
- name: Check package path
run: |
if (-not $package_path) {
Write-Error "未找到安装包路径"
exit 1
}
- name: test - name: test
run: | run: |