diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml new file mode 100644 index 0000000..5b2053d --- /dev/null +++ b/.github/workflows/pypi_release.yaml @@ -0,0 +1,24 @@ +name: Make PyPI release + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI }} + run: | + python3 setup.py sdist bdist_wheel + twine upload dist/*