diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9266661..0dbbf7b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,13 +23,35 @@ jobs: name: python-package-distributions path: dist/ - github-release: - name: Sign the Python distribution with Sigstore and upload them to GitHub Release + publish-to-pypi: + name: Publish Python distribution to PyPI if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes needs: - build runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/ibis-ml + + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing + + steps: + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + + github-release: + name: Sign the Python distribution with Sigstore and upload them to GitHub Release + needs: + - publish-to-pypi + runs-on: ubuntu-latest + permissions: contents: write # IMPORTANT: mandatory for making GitHub Releases id-token: write # IMPORTANT: mandatory for sigstore