Skip to content

Accept code references copied from supplied evidence (0.1.68) #70

Accept code references copied from supplied evidence (0.1.68)

Accept code references copied from supplied evidence (0.1.68) #70

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build wheel and sdist
run: |
python -m pip install --upgrade pip build twine
python -m build
python -m twine check dist/*
- name: Verify release artifacts
run: |
python -m venv /tmp/shellbrain-release-smoke
/tmp/shellbrain-release-smoke/bin/python -m pip install --upgrade pip
/tmp/shellbrain-release-smoke/bin/python -m pip install --no-deps dist/*.whl
/tmp/shellbrain-release-smoke/bin/shellbrain --help
/tmp/shellbrain-release-smoke/bin/shellbrain recall --help
/tmp/shellbrain-release-smoke/bin/shellbrain admin recall provider --help
/tmp/shellbrain-release-smoke/bin/_shellbrain-bootstrap --help
python - <<'PY'
from pathlib import Path
import glob
import zipfile
wheels = glob.glob("dist/shellbrain-*.whl")
if len(wheels) != 1:
raise SystemExit(f"expected one wheel, found {wheels!r}")
required = {
"app/startup/internal_agent_config.py",
"app/entrypoints/bootstrap.py",
"migrations/versions/20260922_0040_recall_failure_reasons.py",
"app/infrastructure/host_apps/inner_agents/inception_api.py",
"migrations/versions/20260519_0023_explicit_teach_trigger.py",
"migrations/versions/20260519_0024_read_retrieval_latency_indexes.py",
"migrations/versions/20260519_0025_repair_recall_source_input_section_constraint.py",
"migrations/versions/20260519_0026_repair_knowledge_build_trigger_constraint.py",
"migrations/versions/20260519_0027_concept_embeddings.py",
"migrations/versions/20260520_0028_knowledge_build_lifecycle.py",
"migrations/versions/20260815_0038_drop_wiki_summaries.py",
"onboarding_assets/codex/AGENTS.md",
"onboarding_assets/codex/shellbrain/SKILL.md",
"onboarding_assets/claude/skills/shellbrain/SKILL.md",
"onboarding_assets/cursor/skills/shellbrain/SKILL.md",
}
with zipfile.ZipFile(Path(wheels[0])) as wheel:
names = set(wheel.namelist())
missing = sorted(required - names)
if missing:
raise SystemExit("wheel is missing release-critical files: " + ", ".join(missing))
PY
- name: Upload distribution artifacts
uses: actions/upload-artifact@v4
with:
name: python-dist
path: dist/*
publish-pypi:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
environment:
name: pypi
url: https://pypi.org/project/shellbrain/
permissions:
id-token: write
steps:
- name: Download distribution artifacts
uses: actions/download-artifact@v4
with:
name: python-dist
path: dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1