Skip to content

Commit d590516

Browse files
authored
Merge pull request #5 from tavallaie/main
✅ Enable Trusted Publisher for PyPI Publishing via GitHub Actions
2 parents 82b02b7 + 4d3e7ac commit d590516

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

.github/workflows/pgmq_python.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,14 @@ jobs:
2626
lints:
2727
runs-on: ubuntu-latest
2828
steps:
29-
- uses: actions/checkout@v4
30-
- name: Set up Python 3.11.0
31-
uses: actions/setup-python@v6
32-
with:
33-
python-version: 3.11.0
29+
- name: Checkout
30+
uses: actions/checkout@v5
3431
- name: Install uv
35-
uses: astral-sh/setup-uv@v4
32+
uses: astral-sh/setup-uv@v6
3633
with:
3734
version: "latest"
35+
- name: Install Python 3.13
36+
run: uv python install 3.13
3837
- name: Install project
3938
run: uv sync --all-groups
4039
- name: Lints / Type Checking
@@ -43,15 +42,14 @@ jobs:
4342
tests:
4443
runs-on: ubuntu-latest
4544
steps:
46-
- uses: actions/checkout@v4
47-
- name: Set up Python 3.11.0
48-
uses: actions/setup-python@v6
49-
with:
50-
python-version: 3.11.0
45+
- name: Checkout
46+
uses: actions/checkout@v5
5147
- name: Install uv
52-
uses: astral-sh/setup-uv@v4
48+
uses: astral-sh/setup-uv@v6
5349
with:
5450
version: "latest"
51+
- name: Install Python 3.13
52+
run: uv python install 3.13
5553
- name: Install project
5654
run: uv sync --all-groups --all-extras
5755
- name: Unit and Integration Tests
@@ -61,20 +59,22 @@ jobs:
6159
runs-on: ubuntu-latest
6260
# only publish off main branch
6361
if: github.repository == 'pgmq/pgmq-py' && github.ref == 'refs/heads/main'
62+
permissions:
63+
id-token: write
64+
contents: read
6465
steps:
65-
- uses: actions/checkout@v4
66-
- name: Set up Python 3.11.0
67-
uses: actions/setup-python@v6
68-
with:
69-
python-version: 3.11.0
66+
- name: Checkout
67+
uses: actions/checkout@v5
7068
- name: Install uv
71-
uses: astral-sh/setup-uv@v4
69+
uses: astral-sh/setup-uv@v6
7270
with:
7371
version: "latest"
72+
- name: Install Python 3.13
73+
run: uv python install 3.13
7474
- name: Install project
7575
run: uv sync --all-groups
76+
77+
- name: build
78+
run: uv build
7679
- name: Publish
77-
env:
78-
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
79-
run: |
80-
uv publish
80+
run: uv publish

0 commit comments

Comments
 (0)