Skip to content
Merged
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
9 changes: 9 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- name: Verify tag matches pyproject version
if: github.event_name == 'release'
run: |
tag="${GITHUB_REF_NAME#v}"
pkg="$(uv version --short)"
if [ "$tag" != "$pkg" ]; then
echo "::error::tag v$tag does not match pyproject version $pkg — bump version in pyproject.toml"
exit 1
fi
- run: uv build
- uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "bruin-sdk"
version = "0.5.0"
version = "0.5.2"
description = "Python SDK for Bruin CLI — query databases, parse context, and access connections with zero boilerplate."
readme = "README.md"
license = "Apache-2.0"
Expand Down
8 changes: 7 additions & 1 deletion src/bruin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
"""Bruin SDK — zero-boilerplate access to Bruin-managed connections and context."""

from importlib.metadata import PackageNotFoundError, version

from bruin._connection import get_connection
from bruin._context import context
from bruin._query import query

__version__ = "0.4.0"
try:
__version__ = version("bruin-sdk")
except PackageNotFoundError: # source tree without an installed distribution
__version__ = "0.0.0.dev0"

__all__ = ["__version__", "context", "get_connection", "query"]
Loading