diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index f7170fc..6ae8b63 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -2,9 +2,14 @@ name: CI on: push: branches: - - master + - main + tags: + - 'v*' pull_request: +env: + PYTHON_BUILD_VERSION: '3.14' + jobs: build: name: Build and Test @@ -37,3 +42,35 @@ jobs: - 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 diff --git a/pyproject.toml b/pyproject.toml index 0c6a7af..8e8bfb6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "pdftables-api" -version = "2.0.0" +version = "2.1.0" requires-python = ">=3.10" description = "PDFTables.com Python API library." readme = "README.md"