Fix: GitHub CI
This commit is contained in:
14
.github/workflows/release.yml
vendored
14
.github/workflows/release.yml
vendored
@@ -51,9 +51,6 @@ jobs:
|
||||
with:
|
||||
key: ${{ matrix.target }}
|
||||
|
||||
- name: Install cargo-binstall
|
||||
uses: cargo-bins/cargo-binstall@main
|
||||
|
||||
- name: Install dependencies (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
@@ -61,13 +58,12 @@ jobs:
|
||||
sudo apt-get install -y build-essential cmake pkg-config libasound2-dev libclang-dev libjack-dev \
|
||||
libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev libgl1-mesa-dev \
|
||||
libx11-dev libx11-xcb-dev libxcursor-dev libxrandr-dev libxi-dev libwayland-dev
|
||||
cargo binstall -y cargo-bundle || cargo install cargo-bundle
|
||||
cargo install cargo-bundle
|
||||
|
||||
- name: Install dependencies (macOS)
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
brew list cmake &>/dev/null || brew install cmake
|
||||
cargo binstall -y cargo-bundle || cargo install cargo-bundle
|
||||
|
||||
- name: Install dependencies (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
@@ -81,8 +77,12 @@ jobs:
|
||||
- name: Build desktop
|
||||
run: cargo build --release --features desktop --bin cagire-desktop --target ${{ matrix.target }}
|
||||
|
||||
- name: Bundle desktop app
|
||||
if: runner.os != 'Windows'
|
||||
- name: Bundle desktop app (macOS)
|
||||
if: runner.os == 'macOS'
|
||||
run: scripts/make-app-bundle.sh ${{ matrix.target }}
|
||||
|
||||
- name: Bundle desktop app (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
run: cargo bundle --release --features desktop --bin cagire-desktop --target ${{ matrix.target }}
|
||||
|
||||
- name: Build AppImages (Linux)
|
||||
|
||||
66
scripts/make-app-bundle.sh
Executable file
66
scripts/make-app-bundle.sh
Executable file
@@ -0,0 +1,66 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Usage: scripts/make-app-bundle.sh <target>
|
||||
# Creates a macOS .app bundle at target/<target>/release/bundle/osx/Cagire.app
|
||||
|
||||
if [[ $# -ne 1 ]]; then
|
||||
echo "Usage: $0 <target>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TARGET="$1"
|
||||
REPO_ROOT="$(git rev-parse --show-toplevel)"
|
||||
BINARY="$REPO_ROOT/target/$TARGET/release/cagire-desktop"
|
||||
ICON="$REPO_ROOT/assets/Cagire.icns"
|
||||
VERSION="0.1.0"
|
||||
|
||||
if [[ ! -f "$BINARY" ]]; then
|
||||
echo "ERROR: binary not found at $BINARY"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
APP_DIR="$REPO_ROOT/target/$TARGET/release/bundle/osx/Cagire.app"
|
||||
CONTENTS="$APP_DIR/Contents"
|
||||
rm -rf "$APP_DIR"
|
||||
mkdir -p "$CONTENTS/MacOS" "$CONTENTS/Resources"
|
||||
|
||||
cp "$BINARY" "$CONTENTS/MacOS/cagire-desktop"
|
||||
[[ -f "$ICON" ]] && cp "$ICON" "$CONTENTS/Resources/Cagire.icns"
|
||||
|
||||
cat > "$CONTENTS/Info.plist" <<PLIST
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleName</key>
|
||||
<string>Cagire</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Cagire</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.sova.cagire</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${VERSION}</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${VERSION}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>cagire-desktop</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Cagire.icns</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>12.0</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.music</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c) 2025 Raphaël Forment</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>Cagire needs microphone access for audio input.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
PLIST
|
||||
|
||||
echo " APP -> $APP_DIR"
|
||||
Reference in New Issue
Block a user