From f78bc488e78c2543023b400d3c381ded6a2da292 Mon Sep 17 00:00:00 2001 From: Zhaopudark Date: Fri, 12 Jan 2024 14:01:49 +0800 Subject: [PATCH] Init v0.0.1 --- .github/workflows/{prerelease.yml => deploy.yml} | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) rename .github/workflows/{prerelease.yml => deploy.yml} (61%) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/deploy.yml similarity index 61% rename from .github/workflows/prerelease.yml rename to .github/workflows/deploy.yml index 13d6148..a340aca 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,7 @@ name: Upload Python Package on: release: - types: [prerelease] + types: [published] jobs: deploy: @@ -17,8 +17,14 @@ jobs: shell: pwsh run: . ./helper/build.ps1 - name: Publish package (prerelease) + if: ${{github.event.release.prerelease}} uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository-url: https://test.pypi.org/legacy/ - \ No newline at end of file + - name: Publish package (release) + if: ${{!github.event.release.prerelease}}} + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} + repository_url: https://upload.pypi.org/legacy/ \ No newline at end of file