Skip to content

Commit

Permalink
ci: Add PyPi workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Apr 10, 2021
1 parent 113f122 commit 05675fe
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish to PyPi
on:
push:
branches:
- pypi
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.6
- run: pip install --upgrade setuptools wheel
- run: python setup.py sdist bdist_wheel
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 05675fe

Please sign in to comment.