Skip to content

Commit

Permalink
Update action to publish to test pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
VasudhaJha authored Jan 24, 2022
1 parent a51b83d commit 1e0d6ef
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/publish-to-pypi.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, created, released]

jobs:
deploy:
Expand All @@ -29,8 +29,16 @@ jobs:
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
- name: Publish package to Test PyPI
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@master
with:
user: ${{ secrets.PYPI_API_TOKEN }}
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish package to PyPI
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 1e0d6ef

Please sign in to comment.