File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish to PyPI
2+ on :
3+ release :
4+ types : [published]
5+ push :
6+ tags : ["v*"]
7+
8+ jobs :
9+ publish-pypi-test :
10+ runs-on : ubuntu-latest
11+ if : github.event_name == 'push'
12+ permissions :
13+ id-token : write
14+ contents : read
15+ steps :
16+ - uses : actions/checkout@v3
17+ - uses : actions/setup-python@v4
18+ with :
19+ python-version : " 3.x"
20+ - name : Build package
21+ run : |
22+ python -m pip install build
23+ python -m build
24+ - name : Publish to TestPyPI
25+ uses : pypa/gh-action-pypi-publish@release/v1
26+ with :
27+ repository-url : https://test.pypi.org/legacy/
28+
29+ publish-prod :
30+ needs : publish-test
31+ runs-on : ubuntu-latest
32+ if : github.event_name == 'release'
33+ permissions :
34+ id-token : write
35+ contents : read
36+ steps :
37+ - uses : actions/checkout@v3
38+ - uses : actions/setup-python@v4
39+ with :
40+ python-version : " 3.x"
41+ - name : Build package
42+ run : |
43+ python -m pip install build
44+ python -m build
45+ - name : Publish to PyPI
46+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments