cmux/.github/workflows/update-homebrew.yml
Lawrence Chen 9817d131f8
Release v1.23.0 (#31)
* Rename cmuxterm to cmux across entire codebase

- Rename GitHub repos: manaflow-ai/cmuxterm -> manaflow-ai/cmux,
  manaflow-ai/homebrew-cmuxterm -> manaflow-ai/homebrew-cmux
- Rename bundle IDs: com.cmuxterm.app -> com.cmux.app
- Rename CLI: CLI/cmuxterm.swift -> CLI/cmux.swift
- Rename homebrew submodule: homebrew-cmuxterm -> homebrew-cmux
- Update all socket paths: /tmp/cmuxterm*.sock -> /tmp/cmux*.sock
- Update all GitHub URLs, DMG names, Sparkle URLs
- Update all source files, scripts, tests, docs, CI workflows

* Bump version to 1.23.0
2026-02-09 15:30:43 -08:00

92 lines
2.7 KiB
YAML

name: Update Homebrew Cask
on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: 'Version tag (e.g., v1.9.0)'
required: true
permissions:
contents: read
jobs:
update-cask:
runs-on: ubuntu-latest
steps:
- name: Get version
id: version
run: |
if [ -n "${{ github.event.inputs.version }}" ]; then
VERSION="${{ github.event.inputs.version }}"
else
VERSION="${{ github.event.release.tag_name }}"
fi
VERSION="${VERSION#v}"
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Download DMG and get SHA256
id: sha
run: |
VERSION="${{ steps.version.outputs.version }}"
curl -sL "https://github.com/manaflow-ai/cmux/releases/download/v${VERSION}/cmux-macos.dmg" -o cmux.dmg
SHA256=$(shasum -a 256 cmux.dmg | cut -d' ' -f1)
echo "sha256=$SHA256" >> $GITHUB_OUTPUT
- name: Checkout homebrew-cmux
uses: actions/checkout@v4
with:
repository: manaflow-ai/homebrew-cmux
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
path: homebrew-cmux
- name: Update cask formula
env:
VERSION: ${{ steps.version.outputs.version }}
SHA256: ${{ steps.sha.outputs.sha256 }}
run: |
cat > homebrew-cmux/Casks/cmux.rb << CASKEOF
cask "cmux" do
version "${VERSION}"
sha256 "${SHA256}"
url "https://github.com/manaflow-ai/cmux/releases/download/v#{version}/cmux-macos.dmg"
name "cmux"
desc "Lightweight native macOS terminal with vertical tabs for AI coding agents"
homepage "https://github.com/manaflow-ai/cmux"
livecheck do
url :url
strategy :github_latest
end
depends_on macos: ">= :ventura"
app "cmux.app"
zap trash: [
"~/Library/Application Support/cmux",
"~/Library/Caches/cmux",
"~/Library/Preferences/ai.manaflow.cmux.plist",
]
end
CASKEOF
# Remove leading whitespace from heredoc
sed -i 's/^ //' homebrew-cmux/Casks/cmux.rb
- name: Commit and push
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
cd homebrew-cmux
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add Casks/cmux.rb
if git diff --staged --quiet; then
echo "No changes - cask already up to date"
else
git commit -m "Update cmux to ${VERSION}"
git push
fi