Skip to content

Commit af63fde

Browse files
committed
feat: add GitHub Actions workflow for multi-platform Rust binary releases
- Add .github/workflows/release-rust.yml for automated builds - Builds aichat-search for 5 platforms: macOS (Intel/ARM), Linux (x64/ARM), Windows - Triggered by pushing rust-v* tags - Add make aichat-search-release target (bump, tag, push, trigger CI) - Update aichat-search-publish to depend on aichat-search-release - Update README and Makefile help Users can now download pre-built binaries from GitHub Releases instead of compiling from source with cargo install.
1 parent 6ed6a6d commit af63fde

3 files changed

Lines changed: 124 additions & 6 deletions

File tree

.github/workflows/release-rust.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Release Rust Binaries
2+
3+
on:
4+
push:
5+
tags:
6+
- 'rust-v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
test:
13+
name: Test
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest, macos-latest, windows-latest]
17+
runs-on: ${{ matrix.os }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Install Rust
22+
uses: dtolnay/rust-toolchain@stable
23+
24+
- name: Run tests
25+
run: cargo test --all
26+
working-directory: rust-search-ui
27+
28+
build:
29+
name: Build ${{ matrix.target }}
30+
needs: test
31+
runs-on: ${{ matrix.os }}
32+
strategy:
33+
matrix:
34+
include:
35+
- target: x86_64-apple-darwin
36+
os: macos-13
37+
name: aichat-search-macos-intel
38+
- target: aarch64-apple-darwin
39+
os: macos-14
40+
name: aichat-search-macos-arm64
41+
- target: x86_64-unknown-linux-gnu
42+
os: ubuntu-latest
43+
name: aichat-search-linux-x86_64
44+
- target: aarch64-unknown-linux-gnu
45+
os: ubuntu-24.04-arm
46+
name: aichat-search-linux-arm64
47+
- target: x86_64-pc-windows-msvc
48+
os: windows-latest
49+
name: aichat-search-windows-x86_64
50+
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- name: Install Rust
55+
uses: dtolnay/rust-toolchain@stable
56+
with:
57+
targets: ${{ matrix.target }}
58+
59+
- name: Build
60+
run: cargo build --release --target ${{ matrix.target }}
61+
working-directory: rust-search-ui
62+
63+
- name: Package (Unix)
64+
if: matrix.os != 'windows-latest'
65+
run: |
66+
cd rust-search-ui/target/${{ matrix.target }}/release
67+
tar czf ../../../../${{ matrix.name }}.tar.gz aichat-search
68+
cd ../../../..
69+
70+
- name: Package (Windows)
71+
if: matrix.os == 'windows-latest'
72+
run: |
73+
cd rust-search-ui/target/${{ matrix.target }}/release
74+
7z a ../../../../${{ matrix.name }}.zip aichat-search.exe
75+
cd ../../../..
76+
77+
- name: Upload artifact
78+
uses: actions/upload-artifact@v4
79+
with:
80+
name: ${{ matrix.name }}
81+
path: |
82+
${{ matrix.name }}.tar.gz
83+
${{ matrix.name }}.zip
84+
85+
release:
86+
name: Create Release
87+
needs: build
88+
runs-on: ubuntu-latest
89+
steps:
90+
- name: Download artifacts
91+
uses: actions/download-artifact@v4
92+
with:
93+
path: artifacts
94+
95+
- name: Create Release
96+
uses: softprops/action-gh-release@v2
97+
with:
98+
files: |
99+
artifacts/**/*.tar.gz
100+
artifacts/**/*.zip
101+
generate_release_notes: true

Makefile

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: install release patch minor major dev-install help clean all-patch all-minor all-major release-github lmsh lmsh-install lmsh-publish aichat-search aichat-search-install aichat-search-publish fix-session-metadata fix-session-metadata-apply delete-helper-sessions delete-helper-sessions-apply prep-node
1+
.PHONY: install release patch minor major dev-install help clean all-patch all-minor all-major release-github lmsh lmsh-install lmsh-publish aichat-search aichat-search-install aichat-search-release aichat-search-publish fix-session-metadata fix-session-metadata-apply delete-helper-sessions delete-helper-sessions-apply prep-node
22

33
help:
44
@echo "Available commands:"
@@ -18,7 +18,8 @@ help:
1818
@echo " make lmsh-publish - Publish lmsh to crates.io"
1919
@echo " make aichat-search - Build aichat-search binary (requires Rust)"
2020
@echo " make aichat-search-install - Build and install aichat-search to ~/.cargo/bin"
21-
@echo " make aichat-search-publish - Publish aichat-search to crates.io"
21+
@echo " make aichat-search-release - Bump version, tag, trigger GitHub Actions build"
22+
@echo " make aichat-search-publish - Release + publish to crates.io"
2223
@echo " make fix-session-metadata - Scan for sessionId mismatches (dry-run)"
2324
@echo " make fix-session-metadata-apply - Actually fix sessionId mismatches"
2425
@echo " make delete-helper-sessions - Find helper sessions to delete (dry-run)"
@@ -72,6 +73,8 @@ clean:
7273
@echo "Clean complete!"
7374

7475
all-patch: prep-node
76+
@echo "Ensuring dev dependencies (commitizen)..."
77+
@uv sync --extra dev --quiet
7578
@echo "Bumping patch version..."
7679
uv run cz bump --increment PATCH --yes
7780
@echo "Pushing to GitHub..."
@@ -86,6 +89,8 @@ all-patch: prep-node
8689
@echo "Build complete! Ready for: uv publish --token YOUR_TOKEN"
8790

8891
all-minor: prep-node
92+
@echo "Ensuring dev dependencies (commitizen)..."
93+
@uv sync --extra dev --quiet
8994
@echo "Bumping minor version..."
9095
uv run cz bump --increment MINOR --yes
9196
@echo "Pushing to GitHub..."
@@ -100,6 +105,8 @@ all-minor: prep-node
100105
@echo "Build complete! Ready for: uv publish --token YOUR_TOKEN"
101106

102107
all-major: prep-node
108+
@echo "Ensuring dev dependencies (commitizen)..."
109+
@uv sync --extra dev --quiet
103110
@echo "Bumping major version..."
104111
uv run cz bump --increment MAJOR --yes
105112
@echo "Pushing to GitHub..."
@@ -158,13 +165,23 @@ aichat-search-install: aichat-search
158165
echo "⚠️ Add ~/.cargo/bin to your PATH if not already there"; \
159166
fi
160167

161-
aichat-search-publish:
168+
aichat-search-release:
162169
@if ! command -v cargo-bump >/dev/null 2>&1; then \
163170
echo "Installing cargo-bump..."; \
164171
cargo install cargo-bump; \
165172
fi
166173
@echo "Bumping aichat-search version..."
167174
@cd rust-search-ui && cargo bump patch
175+
@VERSION=$$(grep "^version" rust-search-ui/Cargo.toml | head -1 | cut -d'"' -f2); \
176+
echo "Creating tag rust-v$$VERSION..."; \
177+
git add rust-search-ui/Cargo.toml; \
178+
git commit -m "bump: aichat-search v$$VERSION"; \
179+
git tag "rust-v$$VERSION"; \
180+
git push && git push --tags
181+
@echo "Tag pushed! GitHub Actions will build and release binaries."
182+
@echo "Check progress at: https://github.com/pchalasani/claude-code-tools/actions"
183+
184+
aichat-search-publish: aichat-search-release
168185
@echo "Publishing aichat-search to crates.io..."
169186
@cd rust-search-ui && cargo publish --allow-dirty
170187
@echo "Published! Users can now install with: cargo install aichat-search"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ to parent sessions. Unlike compaction, nothing is lost:
8181

8282
- **Full parent session preserved** — complete history remains accessible, since
8383
parent session file paths are added at the end of the first user message in the session.
84-
- **Lineage chain** — file paths of all ancestor sessions
85-
- **On-demand retrieval** — the agent can look up any past session to recover
86-
specific details when needed
84+
- **Lineage chain** — file paths of all ancestor sessions (jsonl files).
85+
- **On-demand retrieval** — the agent can look up any past session in the lineage chain
86+
to recover specific details when needed, or when prompted by the user, e.g. "in the linked prior chats, look up how we figured out the node-ui to Python communication".
8787

8888
```bash
8989
aichat resume # Find latest session and choose a strategy

0 commit comments

Comments
 (0)