diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8e2dfb0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: Release +on: + - pull_request + - push + - release + - workflow_dispatch + +jobs: + deploy_pypi: + if: ${{ success() && (contains(github.ref, 'refs/tags') || github.ref == 'refs/heads/master') }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: "0" + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: "3.9" + - name: Build Distribution Package + run: python setup.py sdist && python setup.py bdist_wheel + - name: Push Package to PyPi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}