From 8f8d56356f8e3d91483d6ef87f8c07a968ba3b27 Mon Sep 17 00:00:00 2001 From: xaoyo Date: Mon, 27 Nov 2023 11:50:47 +0800 Subject: [PATCH] test publish.yml --- .github/workflows/publish.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4c823b4..11fef8c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -35,27 +35,23 @@ jobs: run: | python -m build python tests/build_exe.py + - name: Get package path run: | - package_path=$(python -c "import site; print(site.getsitepackages()[1])") - version_list_path="$package_path/pywxdump/version_list.json" + $package_path = $(python -c "import site; print(site.getsitepackages()[1])") + $version_list_path = "$package_path/pywxdump/version_list.json" # Execute packaging command - cmd="pyinstaller --onefile --clean --add-data \"$version_list_path;pywxdump\" --distpath=dist --workpath=build --specpath=build --name=pywxdump dist/tmp.py" - echo $cmd - eval $cmd || exit 1 + $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 $cmd || exit 1 - name: Check package path run: | - if [ -z "$package_path" ]; then - echo "未找到安装包路径" + if (-not $package_path) { + Write-Error "未找到安装包路径" exit 1 - fi - - - name: test - run: | - ls -l dist - ls -l tests + } # - name: Publish package with Twine # 使用 Twine 发布到 PyPI # run: |