Publish release to PyPI #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Publish release to PyPI | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
env: | |
TWINE_USERNAME: __token__ # If an API token is used as pw, the username must be "__token__" | |
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }} | |
jobs: | |
publish-release-to-pypi: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v2 | |
with: | |
enable-cache: true | |
- name: build wheel | |
run: uv build . | |
- name: publish new version to PyPI | |
run: uvx twine upload --verbose --repository-url=https://test.pypi.org/legacy/ dist/* |