diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml new file mode 100644 index 00000000..32440621 --- /dev/null +++ b/.github/workflows/publish-pypi.yml @@ -0,0 +1,28 @@ +name: publish to pypi + +on: + release: + types: [published] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: set up python ${{ matrix.python-version }} + uses: dpdani/setup-python@nogil + with: + python-version: ${{ matrix.python-version }} + - name: check nogil + run: | + python -c "import sys; print(sys.flags.nogil);" + - name: install dependencies + run: | + python -m pip install --upgrade pip + pip install .[dev] + - name: build package + run: python -m build + - name: publish package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }}