77
77
default : ' keeweb'
78
78
type : string
79
79
80
+ # #
81
+ # Pypi Service
82
+ # specifies which pypi service your package is uploaded to (or skip for no upload)
83
+ # #
84
+
85
+ PYPI_RELEASE_TYPE :
86
+ description : ' 🐍 Upload to PyPi.org Service'
87
+ type : choice
88
+ options :
89
+ - Skip
90
+ - Official
91
+ - Test
92
+
80
93
# #
81
94
# true no changes to the repo will be made
82
95
# false workflow will behave normally, and push any changes detected to the files
@@ -178,6 +191,7 @@ jobs:
178
191
release-pypi :
179
192
name : >-
180
193
📦 Release › Pypi
194
+ if : ${{ github.event.inputs.PYPI_RELEASE_TYPE != 'Skip' }}
181
195
runs-on : ubuntu-latest
182
196
needs : [ release-github ]
183
197
steps :
@@ -193,16 +207,28 @@ jobs:
193
207
persist-credentials : false
194
208
195
209
# #
196
- # Release › Pypi › Publish
210
+ # Release › Pypi › Publish (Official)
197
211
# #
198
212
199
- - name : ' 📦 Publish › Pypi'
213
+ - name : ' 📦 Publish › Pypi › Official '
200
214
id : task_pypi_publish
201
215
uses : JRubics/poetry-publish@v2.0
202
- if : ( github.event_name == 'workflow_dispatch ' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
216
+ if : ( github.event.inputs.PYPI_RELEASE_TYPE == 'Official ' && inputs.DRY_RUN == false )
203
217
with :
204
218
pypi_token : ${{ secrets.PYPI_API_TOKEN }}
205
219
220
+ # #
221
+ # Release › Pypi › Publish (Test)
222
+ # #
223
+
224
+ - name : ' 📦 Publish › Pypi › Test'
225
+ id : task_pypi_publish_test
226
+ uses : JRubics/poetry-publish@v2.0
227
+ if : ( github.event.inputs.PYPI_RELEASE_TYPE == 'Test' && inputs.DRY_RUN == false )
228
+ with :
229
+ pypi_token : ${{ secrets.PYPI_API_TEST_TOKEN }}
230
+ repository_url : " https://test.pypi.org/legacy/"
231
+
206
232
# #
207
233
# Job › Release › Ghcr.io
208
234
#
0 commit comments