We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c029509 commit 5d4e63fCopy full SHA for 5d4e63f
.github/workflows/publish.yml
@@ -3,6 +3,13 @@ name: PyPI Publish
3
on:
4
release:
5
types: [created]
6
+ workflow_dispatch:
7
+ inputs:
8
+ test_release:
9
+ description: If true, publish to test.pypi.org
10
+ required: true
11
+ default: true
12
+ type: boolean
13
14
jobs:
15
publish:
@@ -18,4 +25,5 @@ jobs:
18
25
- run: uv build
19
26
- run: uv publish
20
27
env:
21
- UV_PUBLISH_TOKEN: ${{secrets.POETRY_PYPI_TOKEN_PYPI}}
28
+ UV_PUBLISH_TOKEN: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.test_release && secrets.TEST_PYPI_API_TOKEN || secrets.POETRY_PYPI_TOKEN_PYPI }}
29
+ UV_PUBLISH_URL: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.test_release && https://test.pypi.org/legacy/ || https://upload.pypi.org/legacy/ }}
0 commit comments