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+ workflow_dispatch :
5+ inputs :
6+ version :
7+ description : ' Version to publish (e.g. 1.9.0)'
8+ required : true
9+ type : string
10+
11+ jobs :
12+ pypi-publish :
13+ name : Build and publish to PyPI
14+ runs-on : ubuntu-latest
15+ permissions :
16+ id-token : write # IMPORTANT: mandatory for trusted publishing
17+ contents : read
18+
19+ steps :
20+ - uses : actions/checkout@v4
21+ with :
22+ ref : v${{ github.event.inputs.version }}
23+
24+ - name : Set up Python
25+ uses : actions/setup-python@v5
26+ with :
27+ python-version : " 3.x"
28+
29+ - name : Install dependencies
30+ run : |
31+ python -m pip install --upgrade pip
32+ pip install build twine
33+
34+ - name : Build package
35+ run : python -m build
36+
37+ - name : Publish package distributions to PyPI
38+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments