Skip to content

Publish package

Publish package #2

name: Publish package
on:
workflow_dispatch:
release:
types: [created]
jobs:
code_quality:
uses: ./.github/workflows/code_quality.yml
tests:
uses: ./.github/workflows/tests.yml
deploy:
needs: [code_quality, tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: |
./uv.lock
- name: Cache venv
uses: actions/cache@v3
with:
path: .venv
key: python-3-12-venv-${{ hashFiles('./uv.lock') }}
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }}
run: |
. .venv/bin/activate
python -m build
twine upload dist/*