From 97eb65d13fc00360ee23e55fa91f926b6e8c30b1 Mon Sep 17 00:00:00 2001 From: xaoyo Date: Tue, 28 Nov 2023 19:12:39 +0800 Subject: [PATCH] publish test --- .github/workflows/publish.yml | 48 +++++++++++++++++------------------ setup.py | 2 +- tests/build_exe.py | 2 +- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7698dda..d152658 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -45,28 +45,28 @@ jobs: run: | ls -l dist ls -l "${{ github.workspace }}" - cd dist - ./pywxdump.exe +# cd dist +# ./pywxdump.exe -# - name: Publish package with Twine # 使用 Twine 发布到 PyPI -# run: | -# twine upload dist/*.whl dist/*.tar.gz -# env: -# TWINE_USERNAME: __token__ -# TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} -# -# - name: Create Release -# id: create_release -# uses: softprops/action-gh-release@v1 -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# with: -# tag_name: ${{ github.ref }} -# release_name: Release ${{ github.ref.tag }} -# body: | -# [Auto Release] Update PyWxDump to ${{ github.ref }} -# draft: false -# prerelease: false -# files: | -# dist/*.exe -# dist/*.whl \ No newline at end of file + - name: Publish package with Twine # 使用 Twine 发布到 PyPI + run: | + twine upload dist/*.whl dist/*.tar.gz + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + + - name: Create Release + id: create_release + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref.tag }} + body: | + [Auto Release] Update PyWxDump to ${{ github.ref }} + draft: false + prerelease: false + files: | + dist/*.exe + dist/*.whl \ No newline at end of file diff --git a/setup.py b/setup.py index 4f95a3b..ed8e8cf 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() -version = "2.2.13" +version = "2.2.14" install_requires = [ "psutil", diff --git a/tests/build_exe.py b/tests/build_exe.py index 614f4d0..2f7ec88 100644 --- a/tests/build_exe.py +++ b/tests/build_exe.py @@ -68,7 +68,7 @@ coll = COLLECT(exe, os.makedirs("dist", exist_ok=True) # 将代码写入文件 with open("dist/tmp.py", "w", encoding="utf-8") as f: - f.write(code) + f.write(code.strip()) # 获取安装包的路径 package_path = site.getsitepackages()