Repository navigation
Conversation
Greptile SummaryThis PR adds a GitHub Actions workflow for building and releasing the macOS binary. The main changes are:
Confidence Score: 4/5This PR has one contained workflow issue to fix before relying on the release artifact. The workflow is focused and easy to follow, but building before rebasing can attach a stale binary to the latest
What T-Rex did
Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant Dev as Push to main
participant Build as build job (macos-26)
participant Git as main branch / v1 tag
participant Release as release job
participant GH as GitHub Release
Dev->>Build: Trigger workflow
Build->>Build: swift build -c release
Build->>Build: install local-ai-cli-bin
Build->>Git: Commit and push binary if changed
Build->>Git: Force-update v1 tag
Build->>Release: needs: build
Release->>Git: Checkout main and resolve latest tag
Release->>GH: Upload or create release asset
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant Dev as Push to main
participant Build as build job (macos-26)
participant Git as main branch / v1 tag
participant Release as release job
participant GH as GitHub Release
Dev->>Build: Trigger workflow
Build->>Build: swift build -c release
Build->>Build: install local-ai-cli-bin
Build->>Git: Commit and push binary if changed
Build->>Git: Force-update v1 tag
Build->>Release: needs: build
Release->>Git: Checkout main and resolve latest tag
Release->>GH: Upload or create release asset
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
.github/workflows/build.yml:58-60
**Rebuild after rebasing**
`git pull --rebase origin main` runs after the binary is built and committed. When `main` advances while this job is building, the rebase can place an older `local-ai-cli-bin` on top of newer Swift sources, then push that mismatched binary to `main` and release it. Pull/rebase before `swift build`, or rebuild after any successful rebase before committing and pushing the binary.
Reviews (1): Last reviewed commit: "ci: add build and release workflow (mirr..." | Re-trigger Greptile |
| git commit -m "chore: rebuild local-ai-cli-bin" | ||
| git pull --rebase origin main | ||
| git push origin HEAD:main |
There was a problem hiding this comment.
Rebuild after rebasing
git pull --rebase origin main runs after the binary is built and committed. When main advances while this job is building, the rebase can place an older local-ai-cli-bin on top of newer Swift sources, then push that mismatched binary to main and release it. Pull/rebase before swift build, or rebuild after any successful rebase before committing and pushing the binary.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/build.yml
Line: 58-60
Comment:
**Rebuild after rebasing**
`git pull --rebase origin main` runs after the binary is built and committed. When `main` advances while this job is building, the rebase can place an older `local-ai-cli-bin` on top of newer Swift sources, then push that mismatched binary to `main` and release it. Pull/rebase before `swift build`, or rebuild after any successful rebase before committing and pushing the binary.
How can I resolve this? If you propose a fix, please make it concise.
Summary
Adds
build.yml— the cloud-based build and release workflow (mirrors afm-cli pattern).Builds the
local-ai-cli-binbinary onmacos-26(arm64) on every push tomain, commits the binary back, advances thev1floating tag, and uploads the binary as a GitHub release asset.Context
A previous agent accidentally committed this workflow work directly to
main. This PR untangles that:mainhas been reverted to its clean state (originalci.ymlonly), and this branch now introducesbuild.ymlcleanly as a proper PR.Changes
+.github/workflows/build.yml— cloud build + release workflow (97 lines)Merge conflict status
✅ Zero conflicts —
git merge --no-ff --no-commitdry run passed cleanly.