Skip to content

Merge pull request #52 from pdftables/v2.1.0-release #71

Merge pull request #52 from pdftables/v2.1.0-release

Merge pull request #52 from pdftables/v2.1.0-release #71

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
env:
PYTHON_BUILD_VERSION: '3.14'
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install the latest version of uv
uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
- name: Install python
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --frozen
- name: Check formatting
run: make check-format
- name: Check linting
run: make check-fix
- name: Run tests
run: make test
- name: Build package
run: uv build
- name: Upload artifacts
if: matrix.python-version == env.PYTHON_BUILD_VERSION
uses: actions/upload-artifact@v6
with:
name: python-package-distributions
path: dist/
publish:
name: Publish to PyPI
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
permissions:
id-token: write
contents: read
environment:
name: release
url: https://pypi.org/p/python-pdftables-api
steps:
- name: Download artifacts
uses: actions/download-artifact@v7
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0