Skip to content

Commit

Permalink
change publish to pypi trigger to on release (#11)
Browse files Browse the repository at this point in the history
* change publish to pypi trigger to on release
  • Loading branch information
sthiele authored Mar 5, 2020
1 parent 70c22fd commit 3262b67
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Publish Python 🐍 distributions πŸ“¦ to PyPI and TestPyPI

on: push
name: Publish Python 🐍 distributions πŸ“¦ to PyPI
on:
release:
types: [created]

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions πŸ“¦ to PyPI and TestPyPI
name: Build and publish Python 🐍 distributions πŸ“¦ to PyPI
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
Expand All @@ -17,13 +18,8 @@ jobs:
python
setup.py
sdist
- name: Publish distribution πŸ“¦ to PyPI
if: startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_password }}
- name: Publish distribution πŸ“¦ to Test PyPI
- name: Publish package
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
user: __token__
password: ${{ secrets.pypi_password }}

0 comments on commit 3262b67

Please sign in to comment.