Skip to content

Commit 59d1647

Browse files
dhaneshclaude
andcommitted
Prepare v2.0.0 release: docs, workflow, and manifold
- Update README with CLI commands and GitHub Action usage - Add CHANGELOG.md with v2.0.0 release notes - Create automated release workflow (triggered on v*.*.* tag) - Add v2-release manifold tracking release process Push v2.0.0 tag to trigger automated release with binaries. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 3b2271e commit 59d1647

6 files changed

Lines changed: 1100 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
# Automated Release Workflow
2+
# Triggers on version tag push (v*.*.*) to build and publish release
3+
#
4+
# Satisfies:
5+
# - T1: CLI binaries for all 4 platforms
6+
# - T2: Binaries attached to GitHub release
7+
# - S2: Binaries built from tagged commit
8+
# - O3: Release tag matches CLI version
9+
10+
name: Release
11+
12+
on:
13+
push:
14+
tags:
15+
- 'v*.*.*'
16+
17+
permissions:
18+
contents: write
19+
20+
jobs:
21+
build:
22+
name: Build CLI Binaries
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- name: Checkout tagged commit
27+
uses: actions/checkout@v4
28+
29+
- name: Setup Bun
30+
uses: oven-sh/setup-bun@v2
31+
with:
32+
bun-version: latest
33+
34+
- name: Install dependencies
35+
working-directory: cli
36+
run: bun install
37+
38+
- name: Run tests
39+
working-directory: cli
40+
run: bun test
41+
42+
- name: Build binaries for all platforms
43+
working-directory: cli
44+
run: |
45+
mkdir -p dist
46+
47+
echo "Building darwin-arm64..."
48+
bun build ./index.ts --compile --target=bun-darwin-arm64 --outfile ./dist/manifold-darwin-arm64
49+
50+
echo "Building darwin-x64..."
51+
bun build ./index.ts --compile --target=bun-darwin-x64 --outfile ./dist/manifold-darwin-x64
52+
53+
echo "Building linux-x64..."
54+
bun build ./index.ts --compile --target=bun-linux-x64 --outfile ./dist/manifold-linux-x64
55+
56+
echo "Building linux-arm64..."
57+
bun build ./index.ts --compile --target=bun-linux-arm64 --outfile ./dist/manifold-linux-arm64
58+
59+
echo "Build complete. Binary sizes:"
60+
ls -lh dist/
61+
62+
- name: Verify binary sizes under 50MB
63+
working-directory: cli
64+
run: |
65+
for binary in dist/manifold-*; do
66+
size=$(stat -c%s "$binary" 2>/dev/null || stat -f%z "$binary")
67+
size_mb=$((size / 1024 / 1024))
68+
echo "$binary: ${size_mb}MB"
69+
if [ $size_mb -gt 50 ]; then
70+
echo "ERROR: $binary exceeds 50MB limit"
71+
exit 1
72+
fi
73+
done
74+
75+
- name: Upload binaries as artifacts
76+
uses: actions/upload-artifact@v4
77+
with:
78+
name: cli-binaries
79+
path: cli/dist/manifold-*
80+
retention-days: 1
81+
82+
release:
83+
name: Create GitHub Release
84+
needs: build
85+
runs-on: ubuntu-latest
86+
87+
steps:
88+
- name: Checkout
89+
uses: actions/checkout@v4
90+
91+
- name: Download binaries
92+
uses: actions/download-artifact@v4
93+
with:
94+
name: cli-binaries
95+
path: binaries
96+
97+
- name: Get version from tag
98+
id: version
99+
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
100+
101+
- name: Generate release notes
102+
id: notes
103+
run: |
104+
VERSION="${{ steps.version.outputs.version }}"
105+
cat << 'EOF' > release-notes.md
106+
## What's New in ${{ steps.version.outputs.version }}
107+
108+
### Native CLI
109+
110+
Manifold now includes a native CLI for fast, deterministic operations:
111+
112+
```bash
113+
manifold status [feature] # Show manifold state (<100ms)
114+
manifold validate [feature] # Validate schema
115+
manifold init <feature> # Initialize new manifold
116+
manifold verify [feature] # Verify artifacts exist
117+
```
118+
119+
Add `--json` for machine-readable output in CI/CD pipelines.
120+
121+
### GitHub Action
122+
123+
New reusable workflow for CI/CD integration:
124+
125+
```yaml
126+
jobs:
127+
manifold:
128+
uses: dhanesh/manifold/.github/workflows/manifold-verify.yml@main
129+
```
130+
131+
### Installation
132+
133+
```bash
134+
curl -fsSL https://raw.githubusercontent.com/dhanesh/manifold/main/install/install.sh | bash
135+
```
136+
137+
### Downloads
138+
139+
| Platform | Binary |
140+
|----------|--------|
141+
| macOS (Apple Silicon) | `manifold-darwin-arm64` |
142+
| macOS (Intel) | `manifold-darwin-x64` |
143+
| Linux (x64) | `manifold-linux-x64` |
144+
| Linux (ARM64) | `manifold-linux-arm64` |
145+
EOF
146+
147+
- name: Create release
148+
uses: softprops/action-gh-release@v1
149+
with:
150+
name: Manifold ${{ steps.version.outputs.version }}
151+
body_path: release-notes.md
152+
files: binaries/*
153+
draft: false
154+
prerelease: false
155+
env:
156+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
157+
158+
verify:
159+
name: Verify Installation
160+
needs: release
161+
runs-on: ubuntu-latest
162+
163+
steps:
164+
- name: Wait for release assets
165+
run: sleep 10
166+
167+
- name: Test installation
168+
run: |
169+
# Download and install
170+
curl -fsSL https://raw.githubusercontent.com/dhanesh/manifold/main/install/install.sh | bash
171+
172+
# Verify CLI is available
173+
if command -v manifold &> /dev/null; then
174+
manifold --version
175+
echo "CLI installation verified!"
176+
else
177+
# Check ~/.local/bin
178+
if [ -f "$HOME/.local/bin/manifold" ]; then
179+
$HOME/.local/bin/manifold --version
180+
echo "CLI installation verified (in ~/.local/bin)!"
181+
else
182+
echo "WARNING: CLI not found in PATH after installation"
183+
fi
184+
fi

.manifold/v2-release.anchor.yaml

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
# v2-release.anchor.yaml
2+
# Outcome Anchoring for Manifold v2.0.0 Release
3+
# Generated: 2026-01-15
4+
5+
outcome: "Ship Manifold v2.0.0: GitHub release with CLI binaries, updated README, validated installation"
6+
7+
# Backward Reasoning: What MUST be true for this outcome?
8+
9+
required_truths:
10+
- id: RT-1
11+
statement: "All version numbers are synchronized at 2.0.0"
12+
requires:
13+
- "cli/package.json version: 2.0.0"
14+
- "install/install.sh VERSION: 2.0.0"
15+
- "install/install.sh CLI_VERSION: 2.0.0"
16+
current_state: SATISFIED
17+
evidence: "Verified in codebase - all show 2.0.0"
18+
priority: 1
19+
20+
- id: RT-2
21+
statement: "All tests pass"
22+
requires:
23+
- "bun test in cli/ passes"
24+
- "No TypeScript errors"
25+
current_state: SATISFIED
26+
evidence: "39 tests passing, typecheck clean"
27+
priority: 1
28+
29+
- id: RT-3
30+
statement: "CLI binaries can be built for all platforms"
31+
requires:
32+
- "bun build --compile works for darwin-arm64"
33+
- "bun build --compile works for darwin-x64"
34+
- "bun build --compile works for linux-x64"
35+
- "bun build --compile works for linux-arm64"
36+
current_state: NOT_VERIFIED
37+
evidence: "Build scripts exist but not yet executed for all platforms"
38+
priority: 1
39+
40+
- id: RT-4
41+
statement: "README documents CLI commands and GitHub Action"
42+
requires:
43+
- "CLI Commands section with status, validate, init, verify"
44+
- "GitHub Action usage example"
45+
- "Installation includes CLI mention"
46+
current_state: NOT_SATISFIED
47+
evidence: "Current README has no CLI documentation"
48+
priority: 2
49+
50+
- id: RT-5
51+
statement: "Release notes document what's new"
52+
requires:
53+
- "Changelog or release body with v2.0.0 features"
54+
- "CLI introduction highlighted"
55+
- "Breaking changes noted (if any)"
56+
current_state: NOT_SATISFIED
57+
evidence: "No release notes drafted"
58+
priority: 2
59+
60+
- id: RT-6
61+
statement: "Installation works end-to-end"
62+
requires:
63+
- "install.sh downloads CLI binary successfully"
64+
- "manifold command available after install"
65+
- "Works on darwin-arm64 (current machine)"
66+
current_state: NOT_VERIFIED
67+
evidence: "Cannot verify until binaries are published"
68+
priority: 1
69+
70+
# Gap Analysis
71+
gaps:
72+
blocking:
73+
- id: GAP-1
74+
truth: RT-3
75+
issue: "Binaries not yet built"
76+
action: "Run bun run compile:all in cli/"
77+
78+
- id: GAP-2
79+
truth: RT-4
80+
issue: "README lacks CLI documentation"
81+
action: "Add CLI Commands and GitHub Action sections"
82+
83+
- id: GAP-3
84+
truth: RT-5
85+
issue: "No release notes"
86+
action: "Draft release notes for v2.0.0"
87+
88+
non_blocking:
89+
- id: GAP-4
90+
truth: RT-6
91+
issue: "E2E installation not tested"
92+
action: "Test after binaries published, before announcing"
93+
94+
# Solution Space
95+
solution_options:
96+
- option: A
97+
name: "Manual Release"
98+
description: "Build binaries locally, create release via GitHub web UI"
99+
steps:
100+
- "Update README with CLI docs"
101+
- "Commit and push"
102+
- "Create v2.0.0 tag"
103+
- "Build binaries locally (bun run compile:all)"
104+
- "Create GitHub release via web UI"
105+
- "Upload 4 binary assets manually"
106+
satisfies: [RT-1, RT-2, RT-3, RT-4, RT-5, RT-6]
107+
complexity: Low
108+
time: "~15 minutes"
109+
pros:
110+
- "Simple, no CI setup needed"
111+
- "Full control over process"
112+
cons:
113+
- "Manual upload tedious"
114+
- "No automation for future releases"
115+
116+
- option: B
117+
name: "GitHub CLI Release"
118+
description: "Use gh CLI for streamlined release creation"
119+
steps:
120+
- "Update README with CLI docs"
121+
- "Commit and push"
122+
- "Create v2.0.0 tag"
123+
- "Build binaries locally"
124+
- "gh release create v2.0.0 --title 'v2.0.0' --notes-file RELEASE.md"
125+
- "gh release upload v2.0.0 ./cli/dist/*"
126+
satisfies: [RT-1, RT-2, RT-3, RT-4, RT-5, RT-6]
127+
complexity: Low
128+
time: "~10 minutes"
129+
pros:
130+
- "Scriptable and reproducible"
131+
- "Faster than web UI"
132+
cons:
133+
- "Still manual builds"
134+
135+
- option: C
136+
name: "GitHub Actions Automation"
137+
description: "Create release workflow that builds and publishes on tag push"
138+
steps:
139+
- "Create .github/workflows/release.yml"
140+
- "Update README with CLI docs"
141+
- "Commit and push"
142+
- "Push v2.0.0 tag → triggers automated build and release"
143+
satisfies: [RT-1, RT-2, RT-3, RT-4, RT-5, RT-6]
144+
complexity: Medium
145+
time: "~30 minutes setup, then instant releases"
146+
pros:
147+
- "Fully automated future releases"
148+
- "Reproducible builds"
149+
- "Cross-platform builds in CI"
150+
cons:
151+
- "More setup time for first release"
152+
- "Overkill for infrequent releases"
153+
154+
recommendation:
155+
option: B
156+
name: "GitHub CLI Release"
157+
rationale: |
158+
Option B (GitHub CLI) is optimal because:
159+
1. Faster than manual web UI (satisfies B1 - enable adoption quickly)
160+
2. Simple enough for a one-time release
161+
3. Scriptable for documentation
162+
4. We can add automation (Option C) later if releases become frequent
163+
164+
Option C is over-engineering for a project that may release infrequently.
165+
Option A works but is slower and more error-prone.
166+
167+
execution_order:
168+
- phase: "Pre-Release"
169+
steps:
170+
- "1. Verify version consistency (RT-1)"
171+
- "2. Run tests (RT-2)"
172+
- "3. Update README with CLI docs (RT-4)"
173+
- "4. Draft release notes (RT-5)"
174+
- "5. Commit and push changes"
175+
176+
- phase: "Build"
177+
steps:
178+
- "6. Create and push v2.0.0 tag"
179+
- "7. Build binaries: cd cli && bun run compile:all (RT-3)"
180+
- "8. Verify binary sizes < 50MB (T3)"
181+
182+
- phase: "Release"
183+
steps:
184+
- "9. Create release with gh CLI"
185+
- "10. Upload binary assets"
186+
- "11. Test installation in fresh env (RT-6)"
187+
188+
- phase: "Post-Release"
189+
steps:
190+
- "12. Verify install.sh downloads work"
191+
- "13. Update manifold state to CONVERGED"

0 commit comments

Comments
 (0)