From 1a689d3a1c98830cc5e143f91c57e4d9d62b6b88 Mon Sep 17 00:00:00 2001 From: krateng Date: Wed, 15 Dec 2021 07:19:01 +0100 Subject: [PATCH] Added action to publish to PyPI --- .github/workflows/pypi.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/pypi.yml diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml new file mode 100644 index 0000000..8427717 --- /dev/null +++ b/.github/workflows/pypi.yml @@ -0,0 +1,26 @@ +name: Publish Package to PyPI + +on: + push: + tags: + - 'v*.*.*' + +jobs: + publish_to_pypi: + name: Publish a new version to PyPI + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + + - name: Install dependencies + run: pip install wheel setuptools + + - name: Build package + run: python setup.py sdist bdist_wheel + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}