File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Python package to PyPI
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ tags :
7+ - " v*.*.*" # e.g. v0.1.0, v0.1.1
8+
9+ jobs :
10+ build-and-publish :
11+ runs-on : ubuntu-latest
12+
13+ # Required for Trusted Publishing
14+ permissions :
15+ id-token : write
16+ contents : read
17+
18+ # Optional but recommended – must match the PyPI pending publisher
19+ environment : pypi
20+
21+ steps :
22+ - name : Check out source
23+ uses : actions/checkout@v4
24+
25+ - name : Set up Python
26+ uses : actions/setup-python@v5
27+ with :
28+ python-version : " 3.x"
29+
30+ - name : Install build backend
31+ run : |
32+ pip install --upgrade pip
33+ pip install build
34+
35+ - name : Build distributions
36+ run : python -m build
37+
38+ - name : Publish to PyPI (Trusted Publishing)
39+ uses : pypa/gh-action-pypi-publish@release/v1
40+ with :
41+ verbose : true
You can’t perform that action at this time.
0 commit comments