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
33 changes: 13 additions & 20 deletions .github/workflows/on-release-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,25 @@ on:

jobs:

set-version:
runs-on: ubuntu-24.04
release-note:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6

- name: Export tag
id: vars
run: echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT
if: ${{ github.event_name == 'release' }}

- name: Update project version
run: |
sed -i "s/^version = \".*\"/version = \"$RELEASE_VERSION\"/" pyproject.toml
env:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
if: ${{ github.event_name == 'release' }}
- name: Check out
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Upload updated pyproject.toml
uses: actions/upload-artifact@v6
- uses: actions/setup-node@v6
with:
name: pyproject-toml
path: pyproject.toml
node-version: lts/*

- run: npx changelogithub
continue-on-error: true

publish:
runs-on: ubuntu-latest
needs: [set-version]
steps:
- name: Check out
uses: actions/checkout@v6
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,4 @@ reference/

# Local legacy backups created during framework migrations
backup/
_version.py
10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "bub"
version = "0.3.5"
dynamic = ["version"]
description = "A common shape for agents that live alongside people."
authors = [
{ name = "Chojan Shang", email = "psiace@apache.org" },
Expand Down Expand Up @@ -64,9 +64,15 @@ dev = [
]

[build-system]
requires = ["hatchling"]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[tool.hatch.version]
source = "vcs"

[tool.hatch.build.hooks.vcs]
version-file = "src/bub/_version.py"

[tool.hatch.build.targets.sdist]
only-include = ["src/bub", "src/skills", "tests"]

Expand Down
13 changes: 12 additions & 1 deletion src/bub/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
"""Bub framework package."""

from importlib import import_module
from importlib.metadata import PackageNotFoundError
from importlib.metadata import version as metadata_version

from bub.framework import BubFramework
from bub.hookspecs import hookimpl
from bub.tools import tool

__all__ = ["BubFramework", "hookimpl", "tool"]
__version__ = "0.3.5"

try:
__version__ = import_module("bub._version").version
except ModuleNotFoundError:
try:
__version__ = metadata_version("bub")
except PackageNotFoundError:
__version__ = "0.0.0"
1 change: 0 additions & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading