File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Upload Python Package to PyPI when a Release is Created
2+
3+ on :
4+ release :
5+ types : [created]
6+
7+ jobs :
8+ pypi-publish :
9+ name : Build and publish package to PyPI
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Check out code
14+ uses : actions/checkout@v4
15+
16+ - name : Install uv
17+ uses : astral-sh/setup-uv@v3
18+
19+ - name : " Set up Python"
20+ uses : actions/setup-python@v5
21+ with :
22+ python-version-file : " .python-version"
23+
24+ - name : Install the project
25+ run : uv sync --frozen --all-extras --dev
26+
27+ - name : Build
28+ run : uv build
29+
30+ - name : Upload artifacts
31+ uses : actions/upload-artifact@v4
32+ with :
33+ name : release-dists
34+ path : dist/
35+
36+ - name : Publish package to PyPI using uv
37+ env :
38+ UV_PUBLISH_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
39+ run : uv publish
You can’t perform that action at this time.
0 commit comments