From 19f480eee608035aa5fba368c96d4143bc2f5710 Mon Sep 17 00:00:00 2001 From: maxibor Date: Thu, 17 Sep 2020 17:05:03 +0200 Subject: [PATCH] add gh action to publish on pypi upon release --- .github/workflows/publish_pypi.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/publish_pypi.yml diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml new file mode 100644 index 0000000..668ee1a --- /dev/null +++ b/.github/workflows/publish_pypi.yml @@ -0,0 +1,25 @@ +name: publish_pypi + +on: + release: + types: [published, edited] + +jobs: + build-and-publish: + name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v1 + - name: Setup Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + - name: Build distribution + run: | + pip install wheel + python setup.py sdist bdist_wheel + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.PYPI_TOKEN }} +