From d6417dd96213cc3898a3614def5e10a7c12780b0 Mon Sep 17 00:00:00 2001 From: Ali Tavallaie Date: Mon, 22 Sep 2025 18:01:40 +0330 Subject: [PATCH 1/2] add trusted publisher for PyPi --- .github/workflows/pgmq_python.yml | 41 ++++++++++++++----------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/.github/workflows/pgmq_python.yml b/.github/workflows/pgmq_python.yml index ed62fda..56c1b1d 100644 --- a/.github/workflows/pgmq_python.yml +++ b/.github/workflows/pgmq_python.yml @@ -26,15 +26,14 @@ jobs: lints: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Set up Python 3.11.0 - uses: actions/setup-python@v6 - with: - python-version: 3.11.0 + - name: Checkout + uses: actions/checkout@v5 - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@v6 with: version: "latest" + - name: Install Python 3.13 + run: uv python install 3.13 - name: Install project run: uv sync --all-groups - name: Lints / Type Checking @@ -43,15 +42,14 @@ jobs: tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Set up Python 3.11.0 - uses: actions/setup-python@v6 - with: - python-version: 3.11.0 + - name: Checkout + uses: actions/checkout@v5 - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@v6 with: version: "latest" + - name: Install Python 3.13 + run: uv python install 3.13 - name: Install project run: uv sync --all-groups --all-extras - name: Unit and Integration Tests @@ -61,20 +59,19 @@ jobs: runs-on: ubuntu-latest # only publish off main branch if: github.repository == 'pgmq/pgmq-py' && github.ref == 'refs/heads/main' + permissions: + id-token: write + contents: read steps: - - uses: actions/checkout@v4 - - name: Set up Python 3.11.0 - uses: actions/setup-python@v6 - with: - python-version: 3.11.0 + - name: Checkout + uses: actions/checkout@v5 - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@v6 with: version: "latest" + - name: Install Python 3.13 + run: uv python install 3.13 - name: Install project run: uv sync --all-groups - name: Publish - env: - POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} - run: | - uv publish + run: uv publish From 7440980b88c37b0f665fb21b24ef53bafaeb4091 Mon Sep 17 00:00:00 2001 From: Ali Tavallaie Date: Mon, 22 Sep 2025 18:59:31 +0330 Subject: [PATCH 2/2] fix building step --- .github/workflows/pgmq_python.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pgmq_python.yml b/.github/workflows/pgmq_python.yml index 56c1b1d..b24b018 100644 --- a/.github/workflows/pgmq_python.yml +++ b/.github/workflows/pgmq_python.yml @@ -73,5 +73,8 @@ jobs: run: uv python install 3.13 - name: Install project run: uv sync --all-groups + + - name: build + run: uv build - name: Publish run: uv publish