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 : Release to PyPI
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*"
7+
8+ jobs :
9+
10+ build :
11+ name : Build
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout repository
15+ uses : actions/checkout@v4
16+
17+ - name : Set up Python
18+ uses : actions/setup-python@v5
19+ with :
20+ python-version : " 3.11"
21+ cache : " pip"
22+
23+ - name : Install build backend
24+ run : |
25+ python -m pip install --upgrade pip
26+ pip install build twine
27+
28+ - name : Build sdist and wheel
29+ run : python -m build
30+
31+ - name : Check metadata (twine)
32+ run : twine check dist/*
33+
34+ - name : Upload 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+
45+ steps :
46+ - name : Download artifacts
47+ uses : actions/download-artifact@v4
48+ with :
49+ name : dist
50+ path : dist
51+
52+ - name : Publish (PyPI)
53+ uses : pypa/gh-action-pypi-publish@release/v1
54+ with :
55+ password : ${{ secrets.PYPI_API_TOKEN }}
56+ skip-existing : true
You can’t perform that action at this time.
0 commit comments