File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed
Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish to PyPI
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*"
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : read
11+
12+ jobs :
13+ build :
14+ name : Build distributions
15+ runs-on : ubuntu-latest
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v4
19+
20+ - name : Set up Python
21+ uses : actions/setup-python@v5
22+ with :
23+ python-version : " 3.12"
24+ cache : " pip"
25+
26+ - name : Install build tooling
27+ run : |
28+ python -m pip install --upgrade pip
29+ python -m pip install build
30+
31+ - name : Build sdist and wheel
32+ run : python -m build
33+
34+ - name : Upload dist artifacts
35+ uses : actions/upload-artifact@v4
36+ with :
37+ name : dist
38+ path : dist/
39+
40+ publish :
41+ name : Publish to PyPI
42+ needs : build
43+ runs-on : ubuntu-latest
44+ permissions :
45+ id-token : write
46+ steps :
47+ - name : Download dist artifacts
48+ uses : actions/download-artifact@v4
49+ with :
50+ name : dist
51+ path : dist/
52+
53+ - name : Publish
54+ uses : pypa/gh-action-pypi-publish@release/v1
55+ with :
56+ packages-dir : dist/
You can’t perform that action at this time.
0 commit comments