From dc95dadbab0a1faa9bf0e09cada5bb61efd34009 Mon Sep 17 00:00:00 2001 From: Costin Sin Date: Tue, 13 Jan 2026 13:58:24 +0000 Subject: [PATCH] chore: Add PyPi release workflow Add a PyPi release GitHub Actions workflow that triggers a publish whenever a new GitHub release is created Signed-off-by: Costin Sin --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..071eac3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Publish to PyPI + +on: + release: + types: [published] +permissions: + contents: read + +jobs: + pypi-publish: + name: Upload release to PyPI + runs-on: ubuntu-latest + environment: + name: release + url: https://pypi.org/p/ucp-sdk + permissions: + id-token: write + contents: read + steps: + - name: Checkout code + uses: actions/checkout@v4 + + # Installs uv (and manages Python automatically) + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + + # 'uv build' automatically creates the sdist and wheel inz 'dist/' + - name: Build package + run: uv build + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1