Publish to PyPI #4
This file contains hidden or 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 to PyPI | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install UV | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "latest" | |
python-version: "3.12" | |
enable-cache: true | |
- name: Create venv and install build tools | |
run: | | |
uv venv | |
uv pip install build twine | |
- name: Build Package | |
run: uv run python -m build | |
- name: Publish to TestPyPI | |
run: | | |
twine upload dist/* --verbose | |
env: | |
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} |