Skip to content

Commit 5191c8a

Browse files
author
Mahmood Mohammed Seoud
committed
πŸš€ ci: add PyPI trusted publishing workflow
Publishes to PyPI on GitHub Release via trusted publisher (no API token). Requires one-time setup at pypi.org/manage/account/publishing/.
1 parent 88723b4 commit 5191c8a

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
id-token: write # Trusted publisher β€” no API token needed
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.12"
19+
20+
- name: Build package
21+
run: |
22+
pip install build
23+
python -m build
24+
25+
- name: Publish to PyPI
26+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
Β (0)