From 4edd7bcae7d99620a0df8d674e445d7316ebb52b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Pl=C3=BCmer?= Date: Thu, 6 Jan 2022 01:27:20 +0100 Subject: [PATCH] feat: deploy to pypi on release --- .github/workflows/deploy.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..eaa432f --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,29 @@ +name: Upload Python Package + +on: + release: + types: [ created ] + +jobs: + build-n-publish: + name: Build and publish Python 🐍 distributions 📦 to PyPI + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@master + - name: Set up Python 3.9 + uses: actions/setup-python@v1 + with: + python-version: 3.9 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build a binary wheel and a source tarball + run: | + python setup.py sdist bdist_wheel + - name: Publish to pypi + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + run: + twine upload dist/*