diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index aa3d826..87fc1b5 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -1,3 +1,4 @@ +on: push jobs: pypi-publish: name: upload release to PyPI @@ -8,6 +9,26 @@ jobs: # IMPORTANT: this permission is mandatory for trusted publishing id-token: write steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + - name: Install pypa/build + run: >- + python3 -m + pip install + build + --user + - name: Build a binary wheel and a source tarball + run: >- + python3 -m + build + --sdist + --wheel + --outdir dist/ + . # retrieve your distributions here - name: Publish package distributions to PyPI + if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1