Skip to content

Commit

Permalink
Add workflow for pushing to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
goerz committed Dec 30, 2020
1 parent 79dd45c commit d08c745
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,36 @@
name: Release

on: [push, release]

jobs:

push_release_to_pypi:
name: Push Package Release to PyPI
runs-on: ubuntu-18.04
steps:

- uses: actions/checkout@v2

- uses: actions/setup-python@v2
name: Install Python 3.8
with:
python-version: 3.8

- name: Install Tox
run: pip install tox

- name: Build Source and Wheel Package
run: |
tox -e run-cmd -- python setup.py sdist
tox -e run-cmd -- python setup.py bdist_wheel
- name: Check distribution files
run: tox -e run-cmd -- twine check dist/*

- name: Publish package to Test-PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/

0 comments on commit d08c745

Please sign in to comment.