File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 release :
55 types : [published]
66 workflow_dispatch :
7+ inputs :
8+ pypi_target :
9+ description : ' PyPI target (pypi or testpypi)'
10+ default : ' pypi'
11+ type : choice
12+ options :
13+ - pypi
14+ - testpypi
715
816jobs :
917 publish :
@@ -13,10 +21,10 @@ jobs:
1321 id-token : write
1422
1523 steps :
16- - uses : actions/checkout@v4
24+ - uses : actions/checkout@v6
1725
18- - name : Set up Python
19- uses : actions/setup-python@v5
26+ - name : Set up Python 3.11
27+ uses : actions/setup-python@v6
2028 with :
2129 python-version : " 3.12"
2230
3139 - name : Check package
3240 run : twine check dist/*
3341
42+ - name : Publish to TestPyPI
43+ if : ${{ inputs.pypi_target == 'testpypi' }}
44+ uses : pypa/gh-action-pypi-publish@release/v1
45+ with :
46+ repository-url : https://test.pypi.org/legacy/
47+
3448 - name : Publish to PyPI
49+ if : ${{ inputs.pypi_target == 'pypi' || github.event_name == 'release' }}
3550 uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments