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+ ---
2+ name : " Publish Python Package to PyPI on new Release"
3+
4+ " on " :
5+ release :
6+ types : ["created"]
7+
8+ env :
9+ UV_PYTHON_DOWNLOADS : 0
10+
11+ jobs :
12+ build :
13+ name : " Build distribution"
14+ runs-on : ubuntu-latest
15+ permissions : {}
16+ steps :
17+ - name : " Checkout"
18+ uses : actions/checkout@v4
19+ with :
20+ persist-credentials : false
21+
22+ - name : " Set up Python 3.12"
23+ uses : actions/setup-python@v5
24+ with :
25+ python-version : " 3.12"
26+
27+ - name : " Install uv"
28+ uses : astral-sh/setup-uv@v4
29+ with :
30+ enable-cache : false
31+
32+ - name : " Build"
33+ run : uv build
34+
35+ - name : " Upload artifact"
36+ uses : actions/upload-artifact@v4
37+ with :
38+ name : python-package-distributions
39+ path : dist/*
40+
41+ publish :
42+ name : " Publish to PyPI"
43+ needs : build
44+ runs-on : ubuntu-latest
45+ environment :
46+ name : pypi
47+ permissions :
48+ id-token : write
49+ contents : read
50+ steps :
51+ - name : " Download artifact"
52+ uses : actions/download-artifact@v4
53+ with :
54+ name : python-package-distributions
55+ path : dist/
56+
57+ - name : " Install uv"
58+ uses : astral-sh/setup-uv@v4
59+ with :
60+ enable-cache : false
61+
62+ - name : " Publish"
63+ run : uv publish
You can’t perform that action at this time.
0 commit comments