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 to PyPI
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*"
7+ workflow_dispatch :
8+ inputs :
9+ publish :
10+ description : " Publish to PyPI publish"
11+ required : false
12+ default : false
13+ type : boolean
14+
15+ jobs :
16+ pypi-publish :
17+ name : Upload release to PyPI
18+ runs-on : ubuntu-latest
19+ # Specifying a GitHub environment is optional, but strongly encouraged
20+ # environment: pypi
21+ permissions :
22+ # IMPORTANT: this permission is mandatory for Trusted Publishing
23+ id-token : write
24+ steps :
25+ - uses : actions/checkout@v6
26+
27+ - uses : actions/setup-python@v6
28+ with :
29+ python-version : " 3.14"
30+
31+ - name : Install build tool
32+ run : pip install build
33+
34+ # Create wheel and source dist
35+ - name : Build
36+ run : python -m build
37+
38+ - name : Publish package to PyPI
39+ if : ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.publish) }}
40+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments