File tree Expand file tree Collapse file tree 1 file changed +26
-2
lines changed
Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Original file line number Diff line number Diff line change 55
66name : Publish to PyPI
77
8- on : push
9-
8+ on :
9+ push :
10+ tags :
11+ - ' v*' # only publish on version tags (e.g. v1.0.0)
12+ workflow_dispatch :
13+ inputs :
14+ pypi :
15+ description : ' Publish to PyPi'
16+ required : true
17+ default : false
18+ type : boolean
19+ github :
20+ description : ' Publish a GitHub Release'
21+ required : true
22+ default : false
23+ type : boolean
24+ testpypi :
25+ description : ' Publish to TestPyPi'
26+ required : true
27+ default : true
28+ type : boolean
29+
1030env :
1131 PYPI_URL : https://pypi.org/p/django-typer
1232 PYPI_TEST_URL : https://test.pypi.org/project/django-typer
3858 publish-to-pypi :
3959 name : >-
4060 Publish Python 🐍 distribution 📦 to PyPI
61+ if : startsWith(github.ref, 'refs/tags/') # only publish on tag pushes
62+ # if: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.pypi == 'true') || github.event_name != 'workflow_dispatch' }}
4163 needs :
4264 - build
4365 runs-on : ubuntu-latest
5981 name : >-
6082 Sign the Python 🐍 distribution 📦 with Sigstore
6183 and upload them to GitHub Release
84+ if : ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.github == 'true') || github.event_name != 'workflow_dispatch' }}
6285 needs :
6386 - publish-to-pypi
6487 runs-on : ubuntu-latest
@@ -100,6 +123,7 @@ jobs:
100123
101124 publish-to-testpypi :
102125 name : Publish Python 🐍 distribution 📦 to TestPyPI
126+ if : ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.testpypi == 'true') || github.event_name != 'workflow_dispatch' }}
103127 needs :
104128 - build
105129 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments