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 : Publish on PyPI
2+
3+ on :
4+ push :
5+ branches :
6+ - " main"
7+ - " publishing-workflow"
8+ release :
9+ types : [created]
10+
11+ permissions :
12+ contents : read
13+
14+ jobs :
15+
16+ build :
17+ runs-on : ubuntu-latest
18+ steps :
19+ - uses : actions/checkout@v4
20+ with :
21+ fetch-depth : 1
22+
23+ - name : Install the latest version of uv and set the python version
24+ uses : astral-sh/setup-uv@v6.7.0
25+ with :
26+ python-version : " 3.12"
27+
28+ - name : Build wheel
29+ run : |
30+ uv build
31+
32+ - name : Upload build for publishing
33+ uses : actions/upload-artifact@v4
34+ with :
35+ name : parxyval_release
36+ if-no-files-found : error
37+ retention-days : 1
38+ path : dist/*
39+
40+ pypi :
41+ name : Upload release to PyPI
42+ # if: github.event_name == 'release'
43+ runs-on : ubuntu-latest
44+ needs : build
45+ environment : pypi
46+ permissions :
47+ id-token : write
48+ steps :
49+ - name : Install the latest version of uv and set the python version
50+ uses : astral-sh/setup-uv@v6.7.0
51+ # if: github.event_name == 'release'
52+ with :
53+ enable-cache : false
54+ ignore-empty-workdir : true
55+ python-version : " 3.12"
56+
57+ - name : Download build
58+ uses : actions/download-artifact@v4
59+ with :
60+ name : parxyval_release
61+ path : dist
62+
63+ - name : Publish package distributions to PyPI
64+ # if: github.event_name == 'release'
65+ run : uv publish
You can’t perform that action at this time.
0 commit comments