diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 412965dbd6..a3fa4cf9e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -153,3 +153,41 @@ jobs: version: "${{ env.VERSION }}", } }); + + pypi-publish: + runs-on: + group: databricks-deco-testing-runner-group + labels: ubuntu-latest-deco + + needs: goreleaser + + + # IMPORTANT: + # - 'id-token: write' is mandatory for OIDC and trusted publishing to PyPi + # - 'environment: release' is a part of OIDC assertion done by PyPi + # + # See: https://docs.pypi.org/trusted-publishers/creating-a-project-through-oidc/ + environment: release + permissions: + id-token: write + + steps: + - name: Checkout repository and submodules + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Install uv + uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182 # v5.4.1 + with: + version: "0.6.5" + + - name: Build wheel + working-directory: experimental/python + run: make dist + + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4 + with: + packages-dir: experimental/python/dist