File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 description : Python version
1010 required : false
1111 default : " 3.13"
12+ PUBLISH_INDEX :
13+ description : Named index from pyproject.toml to publish to (pypi or test-pypi)
14+ required : false
15+ default : " pypi"
1216 PYPI_TOKEN :
1317 description : PyPI API token.
1418 required : true
3943 shell : bash
4044
4145 - name : Publish to PyPI
42- run : uv publish --token "${{ inputs.PYPI_TOKEN }}"
46+ run : uv publish --index "${{ inputs.PUBLISH_INDEX }}" -- token "${{ inputs.PYPI_TOKEN }}"
4347 shell : bash
Original file line number Diff line number Diff line change 2323 - name : Publish to PyPI Test
2424 uses : ./.github/actions/publish
2525 with :
26- PYPI_REGISTRY : https:// test. pypi.org/legacy/
26+ PUBLISH_INDEX : test- pypi
2727 PYPI_TOKEN : ${{ secrets.PYPI_TEST_TOKEN }}
2828 - name : Publish to PyPI
2929 uses : ./.github/actions/publish
3030 with :
31- PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
31+ PUBLISH_INDEX : pypi
32+ PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
Original file line number Diff line number Diff line change @@ -130,3 +130,15 @@ show_missing = true
130130
131131[tool .coverage .html ]
132132directory = " htmlcov"
133+
134+ [tool .uv .publish ]
135+ # Define named indexes for publishing
136+ [[tool .uv .publish .index ]]
137+ name = " pypi"
138+ url = " https://upload.pypi.org/legacy/"
139+ explicit = true
140+
141+ [[tool .uv .publish .index ]]
142+ name = " test-pypi"
143+ url = " https://test.pypi.org/legacy/"
144+ explicit = true
You can’t perform that action at this time.
0 commit comments