Skip to content

PyPI Publish

PyPI Publish #20

Workflow file for this run

on:
workflow_dispatch:
branches: [main]
release:
types:
- published
name: PyPI Publish
jobs:
publish:
runs-on: ubuntu-latest
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Install deps
run: uv sync --frozen
- name: Run tests
run: uv run --no-sync pytest -v
- name: Build
run: uv build
- name: Publish to PyPI
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: uv publish