Skip to content

Commit

Permalink
Update python-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyyangdev authored Aug 9, 2023
1 parent 2392fcc commit 81d70f2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: Upload Python Package

on:
release:
types: [published]
types: [published,prereleased]

permissions:
contents: read
Expand All @@ -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 }}

0 comments on commit 81d70f2

Please sign in to comment.