diff --git a/.gitea/workflows/build-linux.yml b/.github/workflows/build-linux.yml similarity index 100% rename from .gitea/workflows/build-linux.yml rename to .github/workflows/build-linux.yml diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml new file mode 100644 index 0000000..6964cc8 --- /dev/null +++ b/.github/workflows/build-macos.yml @@ -0,0 +1,68 @@ +name: Build macOS Packages + +on: + push: + branches: + - main + tags: + - 'v*' + pull_request: + +jobs: + build-macos: + name: Build macOS (${{ matrix.platform.name }}) + runs-on: ${{ matrix.platform.os }} + strategy: + matrix: + platform: + - name: Intel + os: macos-13 + target: x86_64-apple-darwin + binary_dir: macos-x86_64 + - name: Apple Silicon + os: macos-14 + target: aarch64-apple-darwin + binary_dir: macos-aarch64 + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + + - name: Install Rust stable + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + targets: ${{ matrix.platform.target }} + + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + + - name: Check sidecar binaries + run: | + if [ ! -d "src-tauri/argyll/${{ matrix.platform.binary_dir }}" ]; then + echo "Warning: macOS ArgyllCMS binaries not found. Please ensure they are downloaded/committed to src-tauri/argyll/${{ matrix.platform.binary_dir }} before release." + fi + + - name: Install Node dependencies + run: npm ci + + - name: Build Tauri App + run: npm run tauri build + + - name: Upload DMG + uses: actions/upload-artifact@v4 + with: + name: iccery-macos-${{ matrix.platform.name }}-dmg + path: src-tauri/target/release/bundle/dmg/*.dmg + + - name: Upload App Bundle + uses: actions/upload-artifact@v4 + with: + name: iccery-macos-${{ matrix.platform.name }}-app + path: src-tauri/target/release/bundle/macos/*.app diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml new file mode 100644 index 0000000..6a3ec10 --- /dev/null +++ b/.github/workflows/build-windows.yml @@ -0,0 +1,57 @@ +name: Build Windows Packages + +on: + push: + branches: + - main + tags: + - 'v*' + pull_request: + +jobs: + build-windows: + name: Build Windows + runs-on: windows-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + + - name: Install Rust stable + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + targets: x86_64-pc-windows-msvc + + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + + - name: Check sidecar binaries + run: | + if (!(Test-Path "src-tauri\argyll\windows-x86_64\argyll-instlist.exe")) { + Write-Host "Warning: Windows ArgyllCMS binaries not found. Please ensure they are downloaded/committed to src-tauri/argyll/windows-x86_64 before release." + } + + - name: Install Node dependencies + run: npm ci + + - name: Build Tauri App + run: npm run tauri build + + - name: Upload MSI Installer + uses: actions/upload-artifact@v4 + with: + name: iccery-windows-msi + path: src-tauri/target/release/bundle/msi/*.msi + + - name: Upload NSIS Installer + uses: actions/upload-artifact@v4 + with: + name: iccery-windows-exe + path: src-tauri/target/release/bundle/nsis/*.exe diff --git a/src-tauri/src/commands.rs b/src-tauri/src/commands.rs index 6af1a4a..65b4f2b 100644 --- a/src-tauri/src/commands.rs +++ b/src-tauri/src/commands.rs @@ -46,6 +46,7 @@ pub async fn resolve_binary(app: AppHandle, binary_name: String) -> Result "linux-x86_64", ("windows", "x86_64") => "windows-x86_64", ("macos", "aarch64") => "macos-aarch64", + ("macos", "x86_64") => "macos-x86_64", _ => "linux-x86_64", };