Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 17 additions & 23 deletions .github/actions/setup-cmux/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: "Setup Cmux"
description: "Setup Bun and install dependencies with caching"
inputs:
install-imagemagick:
description: "Install ImageMagick (needed for electron-builder icon generation)"
required: false
default: "false"
runs:
using: "composite"
steps:
Expand Down Expand Up @@ -29,42 +34,31 @@ runs:
restore-keys: |
${{ runner.os }}-bun-cache-

- name: Cache Homebrew (macOS)
if: runner.os == 'macOS'
uses: actions/cache@v4
with:
path: ~/Library/Caches/Homebrew
key: ${{ runner.os }}-brew-cache-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-brew-cache-

- name: Install dependencies
shell: bash
run: bun install --frozen-lockfile

- name: Install ImageMagick (macOS)
if: runner.os == 'macOS'
if: inputs.install-imagemagick == 'true' && runner.os == 'macOS'
shell: bash
run: |
if ! brew list imagemagick &>/dev/null; then
echo "πŸ“¦ Installing ImageMagick..."
time brew install imagemagick
if command -v magick &>/dev/null; then
echo "βœ… ImageMagick already available"
else
echo "βœ… ImageMagick already installed"
brew list imagemagick --versions
echo "πŸ“¦ Installing ImageMagick..."
HOMEBREW_NO_AUTO_UPDATE=1 brew install imagemagick
fi
# Verify it's in PATH
which magick
magick --version | head -1

- name: Install ImageMagick (Linux)
if: runner.os == 'Linux'
if: inputs.install-imagemagick == 'true' && runner.os == 'Linux'
shell: bash
run: |
if ! command -v convert &> /dev/null; then
echo "Installing ImageMagick..."
sudo apt-get update -qq
sudo apt-get install -y imagemagick
if command -v convert &>/dev/null; then
echo "βœ… ImageMagick already available"
else
echo "ImageMagick already installed"
echo "πŸ“¦ Installing ImageMagick..."
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends imagemagick
fi
convert --version | head -1
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
fetch-depth: 0 # Required for git describe to find tags

- uses: ./.github/actions/setup-cmux
with:
install-imagemagick: true

- name: Build application
run: bun run build
Expand Down Expand Up @@ -71,6 +73,8 @@ jobs:
fetch-depth: 0 # Required for git describe to find tags

- uses: ./.github/actions/setup-cmux
with:
install-imagemagick: true

- name: Build application
run: bun run build
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
fetch-depth: 0 # Required for git describe to find tags

- uses: ./.github/actions/setup-cmux
with:
install-imagemagick: true

- name: Build application
run: bun run build
Expand Down Expand Up @@ -46,6 +48,8 @@ jobs:
fetch-depth: 0 # Required for git describe to find tags

- uses: ./.github/actions/setup-cmux
with:
install-imagemagick: true

- name: Build application
run: bun run build
Expand Down