From bd89952ec721a020632731a53217229b577044a2 Mon Sep 17 00:00:00 2001 From: divyanshujethi Date: Sat, 7 Nov 2026 13:26:14 +0530 Subject: [PATCH] feat(pypi): add publish-pypi.yml workflow and bump dbshield-defense to 0.2.1 --- .github/workflows/publish-pypi.yml | 44 ++++++++++++++++++++++++++++++ sdks/python/dbshield/__init__.py | 2 +- sdks/python/pyproject.toml | 2 +- 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/publish-pypi.yml diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml new file mode 100644 index 0000000..a43ed08 --- /dev/null +++ b/.github/workflows/publish-pypi.yml @@ -0,0 +1,44 @@ +name: Publish dbshield-defense to PyPI + +on: + release: + types: [published] + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+*" + - "python-v*" + - "dbshield-defense-*" + workflow_dispatch: + +jobs: + publish-pypi: + name: Build & Publish to PyPI + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install build tools + run: | + python -m pip install --upgrade pip + pip install build twine + + - name: Build sdist and wheel + run: | + cd sdks/python + python -m build + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: sdks/python/dist/ + password: ${{ secrets.PYPI_API_TOKEN }} + skip-existing: true diff --git a/sdks/python/dbshield/__init__.py b/sdks/python/dbshield/__init__.py index 9fc5955..f95bec0 100644 --- a/sdks/python/dbshield/__init__.py +++ b/sdks/python/dbshield/__init__.py @@ -17,7 +17,7 @@ from .integrations.crewai import DBShieldDatabaseTool from .integrations.llamaindex import DBShieldLlamaIndexTransform -__version__ = "0.2.0" +__version__ = "0.2.1" __all__ = [ "DBShieldGuard", diff --git a/sdks/python/pyproject.toml b/sdks/python/pyproject.toml index 8fb3fa4..2d68db1 100644 --- a/sdks/python/pyproject.toml +++ b/sdks/python/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "dbshield-defense" -version = "0.2.0" +version = "0.2.1" description = "Database Guardrail, SQL AST Firewall & Sandboxing Wire Proxy for AI Coding Agents in Python" readme = "README.md" requires-python = ">=3.9"