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
63 changes: 63 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Release and PyPI Publish

# Requires ADMIN_TOKEN secret (GitHub PAT with repo scope) to push release
# commits to protected branches. Without it, the tag gets created but the
# version bump commit is rejected by branch protection, orphaning the tag.

on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write
contents: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.ADMIN_TOKEN }}

- name: Check if should skip
id: check_skip
run: |
if [ "$(git log -1 --pretty=format:'%an')" = "semantic-release" ]; then
echo "skip=true" >> $GITHUB_OUTPUT
fi

- name: Set up Python
if: steps.check_skip.outputs.skip != 'true'
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install uv
if: steps.check_skip.outputs.skip != 'true'
uses: astral-sh/setup-uv@v4

- name: Python Semantic Release
if: steps.check_skip.outputs.skip != 'true'
id: release
uses: python-semantic-release/python-semantic-release@v9.15.2
with:
github_token: ${{ secrets.ADMIN_TOKEN }}

- name: Build package
if: steps.check_skip.outputs.skip != 'true' && steps.release.outputs.released == 'true'
run: uv build

- name: Publish to PyPI
if: steps.check_skip.outputs.skip != 'true' && steps.release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@release/v1

- name: Publish to GitHub Releases
if: steps.check_skip.outputs.skip != 'true' && steps.release.outputs.released == 'true'
uses: python-semantic-release/publish-action@v9.15.2
with:
github_token: ${{ secrets.ADMIN_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: test

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- uses: astral-sh/setup-uv@v4

- name: Install dependencies
run: uv sync --extra dev

- name: Lint
run: uv run ruff check src/ tests/

- name: Test
run: uv run pytest tests/ -m "not live" -v --timeout=60
21 changes: 20 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "consilium"
version = "0.1.0"
version = "0.3.0"
description = "Multi-LLM council for consensus-driven AI responses"
readme = "README.md"
requires-python = ">=3.10"
Expand Down Expand Up @@ -46,6 +46,25 @@ markers = [
"live: integration tests that require real API keys (deselect with '-m \"not live\"')",
]

[project.urls]
Homepage = "https://github.com/OpenAdaptAI/openadapt-consilium"
Repository = "https://github.com/OpenAdaptAI/openadapt-consilium"
"Bug Tracker" = "https://github.com/OpenAdaptAI/openadapt-consilium/issues"

[tool.ruff]
target-version = "py310"
line-length = 88

[tool.semantic_release]
version_toml = ["pyproject.toml:project.version"]
version_variables = ["src/consilium/__init__.py:__version__"]
commit_message = "chore: release {version}"
major_on_zero = false

[tool.semantic_release.branches.main]
match = "main"

[tool.semantic_release.commit_parser_options]
allowed_tags = ["build", "chore", "ci", "docs", "feat", "fix", "perf", "refactor", "style", "test"]
minor_tags = ["feat"]
patch_tags = ["fix", "perf"]
2 changes: 1 addition & 1 deletion src/consilium/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from consilium.model_registry import get_latest, list_models
from consilium.sdk import council_query

__version__ = "0.1.0"
__version__ = "0.3.0"
__all__ = [
"Council",
"CouncilResult",
Expand Down
Loading