diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..5727628 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,34 @@ +name: Release to PyPI + +on: + release: + types: [published] + tags-ignore: + - '**dev**' + - '**rc**' + + +jobs: + build: + name: Build dist & publish + runs-on: ubuntu-20.04 + + steps: + - name: Checkout the repo and the submodules. + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '3.9' + + - name: Install build dependencies & build + run: | + python -m pip install --upgrade pip + pip install setuptools wheel + python setup.py sdist bdist_wheel + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@v1.3.1 + with: + user: __token__ + password: ${{ secrets.PYPI }}