diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..3c456ac --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,29 @@ +name: Build wheels and deploy + +on: + workflow_dispatch: + release: + types: [published] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install poetry + uses: abatilo/actions-poetry@v2 + with: + poetry-version: "1.7.1" + - name: Install dependencies + run: poetry install --with dev + - name: Package the distribution + run: poetry build + - name: Publish distribution to PyPI + if: ${{ github.event_name == 'release' && github.event.action == 'published'}} + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_TOKEN }} \ No newline at end of file