From 81d70f2f5e25cd7e0f56dd3b3ecb3a268fc36d5d Mon Sep 17 00:00:00 2001 From: Anthony Yang <45056598+anthonyyangdev@users.noreply.github.com> Date: Tue, 8 Aug 2023 21:48:12 -0500 Subject: [PATCH] Update python-publish.yml --- .github/workflows/python-publish.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index bdaab28a..658bf4fc 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -10,7 +10,7 @@ name: Upload Python Package on: release: - types: [published] + types: [published,prereleased] permissions: contents: read @@ -32,8 +32,15 @@ jobs: pip install build - name: Build package run: python -m build - - name: Publish package + - name: Publish package (Release) + if: github.event == 'published' uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} + - name: Publish package (Pre-Release) + if: github.event == 'prereleased' + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.TESTING_PYPI_API_TOKEN }}