Skip to content

Commit

Permalink
ci: combine test-PyPI and PyPI upload into a sequential workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanljones committed May 6, 2022
1 parent 696c503 commit b2d935b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ name: Upload Python Package to PyPi

on:
# Triggers the workflow when a release is created
# release:
# types: [published]
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand Down Expand Up @@ -42,6 +42,14 @@ jobs:
pip install twine
pip install .[build]
- name: Build and publish distribution 📦 to Test PyPI
env:
TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload --repository testpypi dist/*
- name: Build and publish distribution 📦 to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pypi-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ name: Upload Python Package to TestPyPi

on:
# Triggers the workflow when a release is created
release:
types: [published]
# release:
# types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand Down

0 comments on commit b2d935b

Please sign in to comment.