From 02b1b66ae0e98d341ee947dfce80da7b2ab7d246 Mon Sep 17 00:00:00 2001 From: apinator-dev Date: Sat, 17 Oct 2026 16:58:44 +0200 Subject: [PATCH 1/2] chore: configure release-please with a manifest pinned at 1.0.0 Without a v1.0.0 tag or GitHub release, release-please treated the repo as unreleased and proposed 0.1.0. A manifest at 1.0.0 (plus bootstrap-sha at the initial commit) makes the next release a normal bump from 1.0.0: 1.1.0 for the webhook-secret feat. Also keeps __version__ in apinator/__init__.py in sync, which the python strategy could not find on its own. --- .github/workflows/release.yml | 6 +++--- .release-please-manifest.json | 3 +++ apinator/__init__.py | 2 +- release-please-config.json | 12 ++++++++++++ 4 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ca8ed72..f877d60 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,11 +14,11 @@ jobs: outputs: release_created: ${{ steps.release.outputs.release_created }} steps: + # Versioning lives in release-please-config.json and + # .release-please-manifest.json; passing release-type here would make + # the action ignore both and fall back to 0.1.0 (no v1.0.0 tag exists). - uses: googleapis/release-please-action@v4 id: release - with: - release-type: python - package-name: apinator-server publish: needs: release-please diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..37fcefa --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.0.0" +} diff --git a/apinator/__init__.py b/apinator/__init__.py index b684da5..d6a4e61 100644 --- a/apinator/__init__.py +++ b/apinator/__init__.py @@ -7,7 +7,7 @@ from .webhook import verify_webhook from .errors import RealtimeError, AuthenticationError, ValidationError, ApiError -__version__ = "1.0.0" +__version__ = "1.0.0" # x-release-please-version __all__ = [ "Apinator", "authenticate_channel", diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..9d663dc --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "bootstrap-sha": "97e43871f7c985870d24ab5dfb71b8b5043ab031", + "include-component-in-tag": false, + "packages": { + ".": { + "release-type": "python", + "package-name": "apinator-server", + "extra-files": ["apinator/__init__.py"] + } + } +} From e01a86ad49c3fae962c2ca779833947bde2856f6 Mon Sep 17 00:00:00 2001 From: apinator-dev Date: Sun, 25 Oct 2026 01:14:34 +0200 Subject: [PATCH 2/2] ci: run tests before publishing to PyPI and add project links The publish job now runs the test suite before building, and declares contents: read alongside id-token: write for trusted publishing. pyproject gains [project.urls] so the PyPI page links to the site, docs, source and changelog. .coverage is ignored so it never lands in an sdist. --- .github/workflows/release.yml | 12 ++++++++++-- .gitignore | 1 + pyproject.toml | 6 ++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f877d60..c046e98 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,8 +24,13 @@ jobs: needs: release-please if: needs.release-please.outputs.release_created runs-on: ubuntu-latest + # Trusted publishing: PyPI exchanges this job's GitHub OIDC token for a + # short-lived upload credential, so no PyPI token secret is stored. + # Configured on pypi.org (project -> Publishing) for owner apinator-io, + # repo sdk-python, workflow release.yml, environment pypi. environment: pypi permissions: + contents: read id-token: write steps: - uses: actions/checkout@v4 @@ -35,8 +40,11 @@ jobs: with: python-version: "3.12" - - name: Install build tools - run: pip install build + - name: Install build and test tools + run: pip install build pytest + + - name: Test + run: pytest tests/ -q - name: Build package run: python -m build diff --git a/.gitignore b/.gitignore index 5775994..0d528c0 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ build/ .pytest_cache/ .mypy_cache/ .DS_Store +.coverage diff --git a/pyproject.toml b/pyproject.toml index d9fb2c7..575b2c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,12 @@ classifiers = [ "Programming Language :: Python :: 3.12", ] +[project.urls] +Homepage = "https://apinator.io" +Documentation = "https://apinator.io/documentation/#sdk-python" +Source = "https://github.com/apinator-io/sdk-python" +Changelog = "https://github.com/apinator-io/sdk-python/blob/main/CHANGELOG.md" + [project.optional-dependencies] dev = ["pytest>=7.0", "pytest-cov>=4.0"]