Skip to content

Commit 4d72bb2

Browse files
committed
ci(deploy-bundle): add test.pypi.org
1 parent dd82517 commit 4d72bb2

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

.github/workflows/deploy-bundle.yml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,19 @@ on:
7777
default: 'keeweb'
7878
type: string
7979

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+
8093
# #
8194
# true no changes to the repo will be made
8295
# false workflow will behave normally, and push any changes detected to the files
@@ -178,6 +191,7 @@ jobs:
178191
release-pypi:
179192
name: >-
180193
📦 Release › Pypi
194+
if: ${{ github.event.inputs.PYPI_RELEASE_TYPE != 'Skip' }}
181195
runs-on: ubuntu-latest
182196
needs: [ release-github ]
183197
steps:
@@ -193,16 +207,28 @@ jobs:
193207
persist-credentials: false
194208

195209
# #
196-
# Release › Pypi › Publish
210+
# Release › Pypi › Publish (Official)
197211
# #
198212

199-
- name: '📦 Publish › Pypi'
213+
- name: '📦 Publish › Pypi › Official'
200214
id: task_pypi_publish
201215
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 )
203217
with:
204218
pypi_token: ${{ secrets.PYPI_API_TOKEN }}
205219

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+
206232
# #
207233
# Job › Release › Ghcr.io
208234
#

0 commit comments

Comments
 (0)