mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-21 16:34:32 +02:00
48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
name: Publish Python Package
|
|
|
|
on:
|
|
release:
|
|
types: [created]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache: pip
|
|
cache-dependency-path: pyproject.toml
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install --group dev
|
|
- name: Run tests
|
|
run: |
|
|
pytest
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
needs: [test]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.14'
|
|
cache: pip
|
|
cache-dependency-path: pyproject.toml
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install build twine
|
|
- name: Publish
|
|
env:
|
|
TWINE_USERNAME: __token__
|
|
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
|
run: |
|
|
python -m build
|
|
twine upload dist/*
|