Skip to content

Commit

Permalink
ci(deploy-bundle): add test.pypi.org
Browse files Browse the repository at this point in the history
  • Loading branch information
Aetherinox committed Dec 22, 2024
1 parent dd82517 commit 4d72bb2
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions .github/workflows/deploy-bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,19 @@ on:
default: 'keeweb'
type: string

# #
# Pypi Service
# specifies which pypi service your package is uploaded to (or skip for no upload)
# #

PYPI_RELEASE_TYPE:
description: '🐍 Upload to PyPi.org Service'
type: choice
options:
- Skip
- Official
- Test

# #
# true no changes to the repo will be made
# false workflow will behave normally, and push any changes detected to the files
Expand Down Expand Up @@ -178,6 +191,7 @@ jobs:
release-pypi:
name: >-
📦 Release › Pypi
if: ${{ github.event.inputs.PYPI_RELEASE_TYPE != 'Skip' }}
runs-on: ubuntu-latest
needs: [ release-github ]
steps:
Expand All @@ -193,16 +207,28 @@ jobs:
persist-credentials: false

# #
# Release › Pypi › Publish
# Release › Pypi › Publish (Official)
# #

- name: '📦 Publish › Pypi'
- name: '📦 Publish › Pypi › Official'
id: task_pypi_publish
uses: JRubics/poetry-publish@v2.0
if: ( github.event_name == 'workflow_dispatch' && inputs.DRY_RUN == false ) || ( github.event_name == 'push' )
if: ( github.event.inputs.PYPI_RELEASE_TYPE == 'Official' && inputs.DRY_RUN == false )
with:
pypi_token: ${{ secrets.PYPI_API_TOKEN }}

# #
# Release › Pypi › Publish (Test)
# #

- name: '📦 Publish › Pypi › Test'
id: task_pypi_publish_test
uses: JRubics/poetry-publish@v2.0
if: ( github.event.inputs.PYPI_RELEASE_TYPE == 'Test' && inputs.DRY_RUN == false )
with:
pypi_token: ${{ secrets.PYPI_API_TEST_TOKEN }}
repository_url: "https://test.pypi.org/legacy/"

# #
# Job › Release › Ghcr.io
#
Expand Down

0 comments on commit 4d72bb2

Please sign in to comment.