diff --git a/.github/workflows/pip-upload.yml b/.github/workflows/pip-upload.yml new file mode 100644 index 00000000..74a30098 --- /dev/null +++ b/.github/workflows/pip-upload.yml @@ -0,0 +1,32 @@ +name: Upload to PIP + +on: + # trigger the workflow when a release is created + release: + types: [created] + workflow_dispatch: + +jobs: + upload: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: "Installs dependencies" + run: | + python -m pip install --upgrade pip + python -m pip install setuptools wheel twine + + - name: "Builds and uploads to PyPI" + run: | + python setup.py sdist bdist_wheel + python -m twine upload dist/* + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.TWINE_TOKEN }} \ No newline at end of file