From a2ebf70b6ac5de29d3f8e1a5dcc821067b53681e Mon Sep 17 00:00:00 2001 From: Lin Zhang Date: Sun, 27 Sep 2026 15:42:30 +0800 Subject: [PATCH] Add macOS x64 desktop and CLI releases --- .github/workflows/release.yml | 11 +++++++++++ README.md | 4 ++-- install.sh | 11 ++++------- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index deddcd13..30bdf671 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,6 +27,11 @@ jobs: os: macos arch: aarch64 ext: tar.gz + - name: macOS-x64 + runner: macos-15-intel + os: macos + arch: x64 + ext: tar.gz - name: Linux-x64 runner: ubuntu-latest os: linux @@ -152,6 +157,12 @@ jobs: os: macos arch: arm64 ext: dmg + - name: macOS-x64 + runner: macos-15-intel + task: packageReleaseDmg + os: macos + arch: x64 + ext: dmg - name: Linux-x64 runner: ubuntu-latest task: packageReleaseDeb diff --git a/README.md b/README.md index 3ad4f5fa..2367df56 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ Download the latest apps from [GitHub Releases](https://github.com/linroid/Ketch | Platform | Format | |---|---| | Android | `.apk` | -| macOS (arm64) | `.dmg` | +| macOS (x64, arm64) | `.dmg` | | Linux (x64, arm64) | `.deb` | | Windows (x64, arm64) | `.msi` | | iOS | Build from [source](app/ios/) via Xcode | @@ -144,7 +144,7 @@ ketch https://example.com/file.zip ketch server --config /path/to/config.toml ``` -Supported platforms: **macOS** (arm64), **Linux** (x64, arm64), **Windows** (x64). See the [CLI documentation](cli/README.md) for all commands, flags, and config file reference. +Supported platforms: **macOS** (x64, arm64), **Linux** (x64, arm64), **Windows** (x64). See the [CLI documentation](cli/README.md) for all commands, flags, and config file reference. ## How It Works diff --git a/install.sh b/install.sh index a5a02236..af8902a9 100755 --- a/install.sh +++ b/install.sh @@ -88,11 +88,6 @@ main() { info "Installing ketch v${version} (${os}/${arch})" - # macOS CLI is only available for arm64 - if [ "$os" = "macos" ] && [ "$arch" = "x64" ]; then - error "macOS x64 (Intel) builds are not available. Only arm64 (Apple Silicon) is supported." - fi - # Windows via this script is best-effort if [ "$os" = "windows" ]; then warn "For Windows, consider downloading the .zip manually from:" @@ -106,9 +101,11 @@ main() { local filename="ketch-cli-${version}-${os}-${arch}.${ext}" local url="https://github.com/${REPO}/releases/download/v${version}/${filename}" - local tmpdir + local tmpdir cleanup_command tmpdir="$(mktemp -d)" - trap 'rm -rf "$tmpdir"' EXIT + # Capture the path now: local variables are out of scope when the EXIT trap runs. + printf -v cleanup_command 'rm -rf -- %q' "$tmpdir" + trap "$cleanup_command" EXIT info "Downloading ${url}" if ! curl -fSL --progress-bar -o "${tmpdir}/${filename}" "$url"; then