Skip to content

Commit 05b2d72

Browse files
committed
feat: add manual workflow dispatch for PyPI publishing
1 parent 6992b10 commit 05b2d72

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.github/workflows/CD-publish_to_pypi.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ name: CD | Publish Python 🐍 distributions 📦 to PyPI
33
on:
44
push:
55
branches: [main]
6+
workflow_dispatch:
7+
inputs:
8+
force_publish:
9+
description: 'Force publish without release-please'
10+
required: true
11+
default: 'false'
12+
type: choice
13+
options:
14+
- 'true'
15+
- 'false'
616

717
permissions:
818
contents: write
@@ -29,7 +39,7 @@ jobs:
2939
pypi-publish:
3040
name: PyPI Publish
3141
needs: release-please
32-
if: ${{ needs.release-please.outputs.release_created }}
42+
if: ${{ needs.release-please.outputs.release_created || (github.event_name == 'workflow_dispatch' && inputs.force_publish == 'true') }}
3343
runs-on: ubuntu-latest
3444

3545
environment:
@@ -66,8 +76,8 @@ jobs:
6676

6777
notify-runpod-workers:
6878
name: Notify workers
69-
needs: [release-please, build-n-publish]
70-
if: ${{ needs.release-please.outputs.release_created }}
79+
needs: [release-please, pypi-publish]
80+
if: ${{ needs.release-please.outputs.release_created || (github.event_name == 'workflow_dispatch' && inputs.force_publish == 'true') }}
7181
strategy:
7282
matrix:
7383
repo:

0 commit comments

Comments
 (0)