Skip to content

Commit b00033a

Browse files
committed
x
1 parent 2179c1f commit b00033a

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,19 @@ on:
1414
required: true
1515
twine_password:
1616
required: true
17+
workflow_dispatch:
18+
inputs:
19+
version:
20+
description: 'Version to publish (for example: 1.2.3)'
21+
type: string
22+
required: true
23+
repository:
24+
description: 'Package index repository'
25+
type: choice
26+
options:
27+
- pypi
28+
- testpypi
29+
default: pypi
1730

1831
run-name: publish to ${{ inputs.repository }}
1932

@@ -46,8 +59,8 @@ jobs:
4659
run: pyproject-build
4760
- name: Publish
4861
env:
49-
TWINE_USERNAME: ${{ secrets.twine_username }}
50-
TWINE_PASSWORD: ${{ secrets.twine_password }}
62+
TWINE_USERNAME: ${{ secrets.twine_username || secrets.PYPI_USERNAME }}
63+
TWINE_PASSWORD: ${{ secrets.twine_password || secrets.PYPI_TOKEN }}
5164
run: |
5265
pyproject-build
5366
twine upload --repository ${{ inputs.repository }} dist/*

0 commit comments

Comments
 (0)