From 9fc9408fe68e2b818027af591a0b54c6e28bd3a2 Mon Sep 17 00:00:00 2001 From: James Tocknell Date: Thu, 16 Sep 2021 18:57:32 +1000 Subject: [PATCH] Add PyPI upload to GitHub Actions --- .github/workflows/tests.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d1f3060..7e1c6fc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -126,3 +126,16 @@ jobs: tox env: TOXENV: ${{ matrix.tox-env }} + + - name: Build sdist + run: | + python setup.py sdist + + - name: Publish package + # See https://github.com/marketplace/actions/pypi-publish for docs + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + skip_existing: true