- extract graphify/ (code only) instead of . to avoid LLM API key requirement; the repo root contains docs/skills/.md files that trigger semantic extraction - use --out . so output writes to ./graphify-out/ not ./graphify/graphify-out/ - remove --out from export html (flag does not exist; HTML auto-written next to graph) - drop nonexistent --code-only flag from extract command - add comments explaining each flag's behavior Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
58 lines
1.8 KiB
YAML
58 lines
1.8 KiB
YAML
name: Release graph asset
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-graph:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write # needed to upload release assets
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v8.1.0
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install graphify
|
|
run: uv sync --frozen
|
|
|
|
- name: Build graph of graphify source (AST-only, no API cost)
|
|
# Extract only the graphify/ package directory — pure Python code, no
|
|
# docs/skill/markdown files — so extraction never needs an LLM API key.
|
|
# --out . writes output to ./graphify-out/ (not ./graphify/graphify-out/).
|
|
run: uv run --frozen graphify extract graphify/ --out .
|
|
|
|
- name: Generate HTML viewer
|
|
# HTML is written next to graph.json automatically; no --out flag needed.
|
|
run: uv run --frozen graphify export html --graph graphify-out/graph.json
|
|
|
|
- name: Bundle release asset
|
|
run: |
|
|
mkdir -p dist-graph
|
|
cp graphify-out/graph.json dist-graph/
|
|
cp graphify-out/graph.html dist-graph/
|
|
cp graphify-out/GRAPH_REPORT.md dist-graph/
|
|
tar -czf graphify-self-graph.tar.gz -C dist-graph .
|
|
echo "Asset contents:"
|
|
tar -tzf graphify-self-graph.tar.gz
|
|
|
|
- name: Upload to GitHub release
|
|
if: github.event_name == 'release'
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: graphify-self-graph.tar.gz
|
|
|
|
- name: Upload as workflow artifact (for workflow_dispatch runs)
|
|
if: github.event_name == 'workflow_dispatch'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: graphify-self-graph
|
|
path: graphify-self-graph.tar.gz
|
|
retention-days: 7
|