Skip to content

Commit b023f7f

Browse files
committed
fix(desktop): wire Homebrew tap properly (bump-cask -> dedicated tap repo)
- release-desktop.yml bump-cask: clone Lexus2016/homebrew-claude-code-studio via HOMEBREW_TAP_TOKEN and update its cask version+sha; skip cleanly if the secret is absent (release never fails) - homebrew-tap/README.md: one-time tap setup steps (create homebrew-claude-code-studio repo, seed cask, add HOMEBREW_TAP_TOKEN secret) - Casks/claude-code-studio.rb: bump to 5.59.0 + arm64 sha Note: brew install requires the one-time tap repo + secret setup (maintainer); .dmg download works without it.
1 parent bde7eaa commit b023f7f

3 files changed

Lines changed: 49 additions & 7 deletions

File tree

.github/workflows/release-desktop.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,28 @@ jobs:
4242
needs: build
4343
runs-on: ubuntu-latest
4444
steps:
45-
- uses: actions/checkout@v4
46-
- name: Bump Homebrew Cask to released version
45+
- name: Update Homebrew tap cask (skips if HOMEBREW_TAP_TOKEN not set)
46+
env:
47+
TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
4748
run: |
4849
set -euo pipefail
50+
if [ -z "${TAP_TOKEN:-}" ]; then
51+
echo "HOMEBREW_TAP_TOKEN not set — skipping cask bump. See homebrew-tap/README.md to enable the tap."
52+
exit 0
53+
fi
4954
VERSION="${GITHUB_REF_NAME#v}"
5055
DMG="claude-code-studio-${VERSION}-arm64.dmg"
5156
URL="https://github.com/${GITHUB_REPOSITORY}/releases/download/${GITHUB_REF_NAME}/${DMG}"
5257
echo "Fetching $URL"
5358
curl -fL "$URL" -o "$DMG"
5459
SHA="$(shasum -a 256 "$DMG" | awk '{print $1}')"
55-
CASK="homebrew-tap/Casks/claude-code-studio.rb"
60+
git clone "https://x-access-token:${TAP_TOKEN}@github.com/${GITHUB_REPOSITORY_OWNER}/homebrew-claude-code-studio.git" tap
61+
CASK="tap/Casks/claude-code-studio.rb"
5662
sed -i -E "s/^ version \".*\"/ version \"${VERSION}\"/" "$CASK"
5763
sed -i -E "s/^ sha256 .*/ sha256 \"${SHA}\"/" "$CASK"
64+
cd tap
5865
git config user.name "github-actions[bot]"
5966
git config user.email "github-actions[bot]@users.noreply.github.com"
60-
git add "$CASK"
61-
git commit -m "chore: bump Homebrew cask to ${VERSION}" || echo "cask unchanged"
67+
git add Casks/claude-code-studio.rb
68+
git commit -m "chore: claude-code-studio ${VERSION}" || echo "cask unchanged"
6269
git push

homebrew-tap/Casks/claude-code-studio.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cask "claude-code-studio" do
2-
version "5.58.0"
3-
sha256 "a9bbc17fb812556838e021c35b4b9e32106c7ea4f9964e08449f08781cb52ba4"
2+
version "5.59.0"
3+
sha256 "5af60d3c0045fabec02172c7d7d0c2c8d1a6f17e988b0d801e0f69d609c51128"
44

55
url "https://github.com/Lexus2016/claude-code-studio/releases/download/v#{version}/claude-code-studio-#{version}-arm64.dmg"
66
name "Claude Code Studio"

homebrew-tap/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Homebrew Tap — Claude Code Studio (macOS desktop)
2+
3+
`Casks/claude-code-studio.rb` here is the **source** of the macOS Cask. Homebrew taps must
4+
live in a repo named `homebrew-<name>`, so to make `brew install` work you publish this cask
5+
to a dedicated tap repository. This is a **one-time** setup.
6+
7+
## One-time setup (maintainer)
8+
9+
1. **Create a public repo** `https://github.com/Lexus2016/homebrew-claude-code-studio`.
10+
2. **Seed it** with the cask from this folder:
11+
```bash
12+
git clone https://github.com/Lexus2016/homebrew-claude-code-studio.git
13+
cd homebrew-claude-code-studio
14+
mkdir -p Casks
15+
cp /path/to/claude-code-studio/homebrew-tap/Casks/claude-code-studio.rb Casks/
16+
git add Casks && git commit -m "init: claude-code-studio cask" && git push
17+
```
18+
3. **Enable auto-bump (recommended):** create a fine-grained Personal Access Token with
19+
**Contents: write** on `homebrew-claude-code-studio`, and add it to the **main** repo as a
20+
secret named `HOMEBREW_TAP_TOKEN`. The `release-desktop.yml``bump-cask` job then updates
21+
the tap's cask `version` + `sha256` automatically on every release. Without the secret, the
22+
job skips cleanly (the release still succeeds) and you bump the cask manually.
23+
24+
## Users install with
25+
26+
```bash
27+
brew install --cask Lexus2016/claude-code-studio/claude-code-studio
28+
```
29+
30+
Updates happen **in-app** (the app runs `brew upgrade --cask claude-code-studio` for you), or
31+
run that command manually.
32+
33+
> **Until the tap repo exists,** install the desktop app by downloading the `.dmg` from the
34+
> [latest release](https://github.com/Lexus2016/claude-code-studio/releases/latest) — that path
35+
> needs no Homebrew setup. (Currently the cask is arm64-only; an x64 dmg is also published.)

0 commit comments

Comments
 (0)