Skip to content

Commit a4db594

Browse files
committed
ci(desktop): build macOS and Windows bundles too
Add macOS (arm64 + Intel) and Windows to the release matrix, so a tag builds deb/AppImage, dmg, and an NSIS installer in one go. Run the vendor + build steps under bash for a uniform invocation across runners, and make vendor-node.sh's Windows zip extraction fall back across unzip/7z/tar. macOS and Windows bundles are unsigned for now (Gatekeeper/SmartScreen will warn) — signing is a later add.
1 parent 92c3288 commit a4db594

2 files changed

Lines changed: 18 additions & 16 deletions

File tree

.github/workflows/release.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,14 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
include:
20-
- platform: ubuntu-22.04
20+
- platform: ubuntu-22.04 # Linux x64 (deb + AppImage)
2121
bundles: 'deb,appimage'
22-
# Expand over time — vendor-node.sh auto-detects the runner's triple, so
23-
# adding a platform is mostly just another matrix entry:
24-
# - platform: macos-14 # Apple Silicon
25-
# bundles: 'dmg'
26-
# - platform: macos-13 # Intel
27-
# bundles: 'dmg'
28-
# - platform: windows-latest # (use node_modules/.bin/tauri.cmd to build)
29-
# bundles: 'nsis'
22+
- platform: macos-14 # macOS Apple Silicon
23+
bundles: 'dmg'
24+
- platform: macos-13 # macOS Intel
25+
bundles: 'dmg'
26+
- platform: windows-latest # Windows x64
27+
bundles: 'nsis'
3028
runs-on: ${{ matrix.platform }}
3129
steps:
3230
- uses: actions/checkout@v4
@@ -60,13 +58,15 @@ jobs:
6058
# in the checkout). vendor-node.sh resolves the host triple itself.
6159
- name: Vendor the node sidecar
6260
working-directory: app/src-tauri
61+
shell: bash
6362
run: ./vendor-node.sh
6463

6564
# Build the bundle. The tauri CLI (from @tauri-apps/cli, installed by vp) runs
6665
# `vp build` (beforeBuildCommand) then bundles. `--bundles` overrides the
6766
# deb-only default in tauri.conf.json for this platform.
6867
- name: Build the desktop bundle
6968
working-directory: app
69+
shell: bash
7070
run: ./node_modules/.bin/tauri build --bundles ${{ matrix.bundles }}
7171

7272
# Attach the bundles to a draft Release for the pushed tag.
@@ -76,9 +76,8 @@ jobs:
7676
with:
7777
draft: true
7878
files: |
79-
app/src-tauri/target/release/bundle/**/*.deb
80-
app/src-tauri/target/release/bundle/**/*.AppImage
81-
app/src-tauri/target/release/bundle/**/*.dmg
82-
app/src-tauri/target/release/bundle/**/*.msi
83-
app/src-tauri/target/**/release/bundle/**/*.deb
84-
app/src-tauri/target/**/release/bundle/**/*.AppImage
79+
app/src-tauri/target/**/bundle/**/*.deb
80+
app/src-tauri/target/**/bundle/**/*.AppImage
81+
app/src-tauri/target/**/bundle/**/*.dmg
82+
app/src-tauri/target/**/bundle/**/*.msi
83+
app/src-tauri/target/**/bundle/**/*.exe

app/src-tauri/vendor-node.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ trap 'rm -rf "$TMP"' EXIT
2727

2828
if [[ "$NODE_ARCH" == win-* ]]; then
2929
curl -fsSL "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-$NODE_ARCH.zip" -o "$TMP/node.zip"
30-
unzip -q "$TMP/node.zip" -d "$TMP"
30+
# extract with whatever's available (Git Bash often lacks unzip; 7z/bsdtar do zip)
31+
if command -v unzip >/dev/null 2>&1; then unzip -q "$TMP/node.zip" -d "$TMP"
32+
elif command -v 7z >/dev/null 2>&1; then 7z x -o"$TMP" "$TMP/node.zip" >/dev/null
33+
else tar -xf "$TMP/node.zip" -C "$TMP"; fi
3134
cp "$TMP/node-v$NODE_VERSION-$NODE_ARCH/node.exe" "$DIR/binaries/node-$TRIPLE.exe"
3235
else
3336
curl -fsSL "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-$NODE_ARCH.tar.xz" -o "$TMP/node.tar.xz"

0 commit comments

Comments
 (0)