Skip to content

Commit 9118d4a

Browse files
committed
adding trusted publishing workflow
1 parent 06c9e75 commit 9118d4a

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
# Optional: allow manual triggers
7+
workflow_dispatch:
8+
9+
jobs:
10+
publish:
11+
name: Publish to PyPI
12+
runs-on: ubuntu-latest
13+
14+
permissions:
15+
# IMPORTANT: this permission is mandatory for trusted publishing
16+
id-token: write
17+
contents: read
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Install uv
24+
uses: astral-sh/setup-uv@v6
25+
with:
26+
enable-cache: true
27+
28+
- name: Set up Python
29+
run: uv python install 3.13
30+
31+
- name: Build package
32+
run: uv build
33+
34+
- name: Publish to PyPI
35+
uses: pypa/gh-action-pypi-publish@release/v1
36+
with:
37+
# No token needed - uses OIDC trusted publishing
38+
print-hash: true

0 commit comments

Comments
 (0)