File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11---
2- name : Publish Python Package
2+ name : Publish Python 🐍 package to PyPI
33
44on :
55 release :
6- types : [created]
6+ types : [published]
7+
8+ permissions :
9+ id-token : write # REQUIRED for OIDC
10+ contents : read # required for checkout
711
812jobs :
9- build-n-publish :
10- name : Build and publish Python 🐍 distributions 📦 to PyPI
13+ publish :
14+ name : Publish to PyPI
15+ environment : release # Must match the environment name in PyPI
1116 runs-on : ubuntu-latest
1217
1318 steps :
14- - uses : actions/checkout@v3
19+ - name : Check out repository
20+ uses : actions/checkout@v4
1521
16- - name : Install uv
17- uses : astral-sh /setup-uv@v3
22+ - name : Set up Python
23+ uses : actions /setup-python@v5
1824 with :
19- enable-cache : true
25+ python-version : ' 3.x '
2026
21- - name : Set up Python
22- run : uv python install 3.10
27+ - name : Install build tools
28+ run : pip install build
2329
24- - name : Build source and wheel archives
25- run : uv build
30+ - name : Build package
31+ run : python -m build
2632
27- - name : Publish distribution 📦 to PyPI
28- uses : pypa/gh-action-pypi-publish@v1.2.2
29- with :
30- user : __token__
31- password : ${{ secrets.PYPI_PASSWORD }}
33+ - name : Publish to PyPI via Trusted Publisher
34+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments