Skip to content

Publish release to PyPI #15

Publish release to PyPI

Publish release to PyPI #15

---
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/*