From 12cb8f6bb2dffeb9f569ea17b206ac3212cb02e5 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Sat, 24 Oct 2020 21:58:28 +0200 Subject: [PATCH] adding gh action for pypi release --- .github/workflows/pypi-release.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/pypi-release.yml diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml new file mode 100644 index 0000000..d61369a --- /dev/null +++ b/.github/workflows/pypi-release.yml @@ -0,0 +1,29 @@ +name: Release to PyPI + +on: + release: + types: [created] + +jobs: + release: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install Tools + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine pypandoc + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Build and Publish + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/*