ci: add v* tag release pipeline for universal binaries#21
ci: add v* tag release pipeline for universal binaries#21linhay wants to merge 6 commits intolynnswap:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a tag-triggered GitHub Actions release pipeline that builds per-arch macOS executables, merges them into a universal binary set, and publishes machine-consumable release assets for downstream auto-install/update flows.
Changes:
- Introduces
v*tag-based GitHub Actions workflow to test, build arm64/x86_64 artifacts, merge withlipo, and publish a GitHub Release. - Adds helper scripts to stage per-arch release binaries and package universal tarball + SHA256 sums.
- Documents GitHub Releases-based installation and ignores generated
dist/andrelease/directories.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/package-universal.sh |
Merges staged arm64/x86_64 binaries with lipo, tars them, and writes SHA256SUMS.txt. |
scripts/build-release.sh |
Builds SwiftPM release products and stages them under dist/<arch>/bin with a manifest. |
README.md |
Adds installation instructions for downloading and verifying GitHub Release assets. |
.gitignore |
Ignores generated dist/ and release/ output directories. |
.github/workflows/release.yml |
Implements tag-triggered CI: test, per-arch build, universal packaging, and GitHub Release publish. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```bash | ||
| VERSION=v0.1.0 | ||
| ASSET="xcode-mcp-proxy_${VERSION}_darwin_universal.tar.gz" | ||
| BASE_URL="https://github.com/<owner>/XcodeMCPKit/releases/download/${VERSION}" |
There was a problem hiding this comment.
The download URL uses a literal <owner> placeholder, so the example commands will fail as written. Replace this with the real repository owner/org (or use a placeholder pattern that matches GitHub’s actual URL structure, e.g. <OWNER>/<REPO>), and ensure the repo name matches the actual GitHub repo slug users should install from.
| BASE_URL="https://github.com/<owner>/XcodeMCPKit/releases/download/${VERSION}" | |
| BASE_URL="https://github.com/<OWNER>/XcodeMCPKit/releases/download/${VERSION}" |
| case "$arch" in | ||
| arm64|x86_64) ;; | ||
| *) | ||
| echo "Unsupported arch: $arch (expected arm64 or x86_64)" >&2 | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" | ||
| if [[ "$dist_root" = /* ]]; then | ||
| dist_base="$dist_root" | ||
| else | ||
| dist_base="$repo_root/$dist_root" | ||
| fi | ||
|
|
||
| out_dir="$dist_base/$arch" | ||
| bin_out="$out_dir/bin" | ||
| products=( | ||
| "xcode-mcp-proxy" | ||
| "xcode-mcp-proxy-server" | ||
| "xcode-mcp-proxy-install" | ||
| ) | ||
|
|
||
| pushd "$repo_root" >/dev/null | ||
|
|
||
| for product in "${products[@]}"; do | ||
| swift build -c release --product "$product" | ||
| done |
There was a problem hiding this comment.
--arch is only used to choose the output directory/manifest and is not used to control or validate the architecture produced by swift build. This can silently stage binaries that don’t match the requested arch (e.g., if run on an unexpected runner). Consider either inferring arch from uname -m, passing an explicit build option (like --arch/--triple if supported in your SwiftPM version), and/or validating the produced binaries (e.g., lipo -info/file) and failing if they don’t match.
| build-x86_64: | ||
| name: Build (x86_64) | ||
| needs: test | ||
| runs-on: macos-13 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Build release binaries | ||
| run: scripts/build-release.sh --arch x86_64 --version "${GITHUB_REF_NAME}" --dist-root dist | ||
|
|
There was a problem hiding this comment.
The workflow builds the x86_64 slice on macos-13, but this repo’s Package.swift declares // swift-tools-version: 6.2 and platforms: [.macOS(.v15)]. Unless the job installs/selects a Swift 6.2 / Xcode 16 toolchain, swift build on macos-13 is likely to fail due to an incompatible default toolchain/SDK. Consider selecting an explicit Xcode version in the workflow (e.g., via xcode-select/a setup action) or adjusting the runner strategy so the x86_64 job uses a runner with a compatible toolchain.
|
Update: validated release pipeline on fork with tag .
|
Summary
v*tagslipoxcode-mcp-proxy_<tag>_darwin_universal.tar.gzandSHA256SUMS.txtWhy
Downstream apps need stable, machine-consumable release artifacts for auto-install/update flows.
Validation
swift testswift build -c release --product xcode-mcp-proxyswift build -c release --product xcode-mcp-proxy-serverswift build -c release --product xcode-mcp-proxy-installscripts/build-release.sh --arch arm64 --version v0.0.0-local --dist-root distbash -n scripts/build-release.shbash -n scripts/package-universal.shNotes