Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- name: Checkout repository
Expand All @@ -36,7 +36,7 @@ jobs:
API_KEY: ${{ secrets.API_KEY }}

- name: Run example tests
if: matrix.python-version == '3.13'
if: matrix.python-version == '3.14'
run: pytest -k "example"
env:
API_KEY: ${{ secrets.API_KEY }}
21 changes: 7 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6

Expand All @@ -31,7 +31,7 @@ jobs:
API_KEY: ${{ secrets.API_KEY }}

- name: Run example tests
if: matrix.python-version == '3.13'
if: matrix.python-version == '3.14'
run: pytest -k "example"
env:
API_KEY: ${{ secrets.API_KEY }}
Expand Down Expand Up @@ -62,19 +62,18 @@ jobs:
name: Publish release
needs: [build]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/serpapi
permissions:
contents: write
packages: write
id-token: write
steps:
- uses: actions/download-artifact@v8
with:
name: dist
path: dist/

- uses: actions/setup-python@v6
with:
python-version: "3.13"

- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -83,14 +82,8 @@ jobs:
gh release create ${{ github.ref_name }} dist/* --generate-notes \
|| gh release upload ${{ github.ref_name }} dist/* --clobber

- name: Install twine
run: pip install --upgrade pip twine

- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*
uses: pypa/gh-action-pypi-publish@release/v1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for switching to official solution.


smoke-test:
name: Smoke test published package
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,4 +380,4 @@ Bug reports and pull requests are welcome on GitHub. Once dependencies are insta
```
This triggers the [release workflow](.github/workflows/release.yml), which tests, builds, and publishes to PyPI, then smoke-tests the published package.

> **Required secrets:** `PYPI_API_TOKEN` (PyPI upload token) and `API_KEY` (used in smoke-test live search).
> **Required secret:** `API_KEY` (used in smoke-test live search).