6868 - name : Use npm registry (yarnpkg.com has intermittent 500s)
6969 run : yarn config set registry https://registry.npmjs.org
7070
71+ # Patch the desktop version from the tag BEFORE any Tauri build so every
72+ # bundle (and the updater metadata) carries the release version — no
73+ # stale 0.1.0 artifacts from intermediate builds.
74+ - name : Patch desktop version from tag
75+ if : startsWith(github.ref, 'refs/tags/v')
76+ shell : bash
77+ run : |
78+ V="${GITHUB_REF_NAME#v}"
79+ jq --arg v "$V" '.version = $v' packages/silex-desktop/src-tauri/tauri.conf.json > /tmp/tauri.conf.json
80+ mv /tmp/tauri.conf.json packages/silex-desktop/src-tauri/tauri.conf.json
81+ echo "Desktop version set to $V"
82+
7183 - name : Install JS dependencies and build frontend
7284 shell : bash
7385 run : yarn install --ignore-scripts && yarn run build
8496 # ── silex-desktop (Tauri) ────────────────────────────────────
8597 # Build Tauri first — it compiles silex-server as a library dependency.
8698 # The standalone server build below reuses the cached compilation.
87- # Compute the monorepo version (tag without the leading 'v') so Tauri
88- # bundles the artifacts as Silex_<tag>_*.deb etc.
89- - name : Compute release version
90- if : startsWith(github.ref, 'refs/tags/v')
91- id : release_version
92- shell : bash
93- run : echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
94-
9599 # Sign updater artifacts only on tag pushes (secrets unavailable on fork PRs).
96100 - name : Build Tauri app (signed)
97101 if : startsWith(github.ref, 'refs/tags/v')
@@ -104,7 +108,7 @@ jobs:
104108 with :
105109 projectPath : packages/silex-desktop
106110 tauriScript : yarn tauri
107- args : --config '{"version":"${{ steps.release_version.outputs.version }}"}' ${{ matrix.rust-target && format('--target {0}', matrix.rust-target) || '' }}
111+ args : ${{ matrix.rust-target && format('--target {0}', matrix.rust-target) || '' }}
108112
109113 # Write a temp config to disable updater artifacts (they require signing keys)
110114 - name : Disable updater artifacts config
@@ -131,7 +135,7 @@ jobs:
131135 name : silex-desktop-${{ matrix.platform }}
132136 path : |
133137 target/**/release/bundle/**/*.dmg
134- target/**/release/bundle/**/*.app
138+ target/**/release/bundle/**/*.AppImage
135139 target/**/release/bundle/**/*.deb
136140 target/**/release/bundle/**/*.rpm
137141 target/**/release/bundle/**/*.exe
@@ -211,34 +215,59 @@ jobs:
211215 find artifacts/silex-server-macos-x64 -name 'silex-server' -type f -exec cp {} release/silex-server-macos-x64 \;
212216 find artifacts/silex-server-windows -name 'silex-server.exe' -type f -exec cp {} release/silex-server-windows-amd64.exe \;
213217
214- # Desktop installers + updater artifacts (flatten into release/)
218+ # Desktop installers + updater artifacts (flatten into release/).
219+ # Tauri v2 updater artifacts are the bundles themselves + .sig:
220+ # Linux = .AppImage, macOS = .app.tar.gz, Windows = -setup.exe.
221+ # NB: deb staging dirs contain control.tar.gz/data.tar.gz — not matched here.
215222 find artifacts/silex-desktop-* -type f \
216- \( -name '*.deb' -o -name '*.rpm' -o -name '*.dmg' -o -name '*.exe' \
217- -o -name '*.tar.gz ' -o -name '*.tar.gz .sig' \
218- -o -name '*.zip ' -o -name '*.zip .sig' \) \
223+ \( -name '*.deb' -o -name '*.rpm' -o -name '*.dmg' -o -name '*-setup .exe' \
224+ -o -name '*.AppImage ' -o -name '*.AppImage.sig' -o -name '*-setup.exe .sig' \
225+ -o -name '*.AppImage.tar.gz ' -o -name '*.AppImage.tar.gz .sig' \) \
219226 -exec cp {} release/ \;
220227
228+ # macOS updater bundles are named Silex.app.tar.gz on both arches —
229+ # rename per-arch while copying so they don't overwrite each other.
230+ V="${VERSION#v}"
231+ for pair in "macos-arm aarch64" "macos-x64 x64"; do
232+ set -- $pair
233+ SRC=$(find "artifacts/silex-desktop-$1" -name '*.app.tar.gz' ! -name '*.sig' | head -1)
234+ if [ -n "$SRC" ]; then
235+ cp "$SRC" "release/Silex_${V}_$2.app.tar.gz"
236+ cp "$SRC.sig" "release/Silex_${V}_$2.app.tar.gz.sig" 2>/dev/null || true
237+ fi
238+ done
239+
221240 # Helper: find file + read its .sig
222241 sig() { cat "$1.sig" 2>/dev/null || echo ""; }
223242
224- # Build latest.json for the Tauri updater
243+ # Build latest.json for the Tauri updater (v2 artifact names)
225244 BASE="https://github.com/${REPO}/releases/download/${VERSION}"
226- LINUX_TAR=$(find release -name '*_amd64.tar.gz' ! -name '*.sig' | head -1)
227- MACOS_ARM_TAR=$(find release -name '*_aarch64.app.tar.gz' | head -1)
228- MACOS_X64_TAR=$(find release -name '*_x64.app.tar.gz' | head -1)
229- WINDOWS_ZIP=$(find release -name '*_x64-setup*.zip' ! -name '*.sig' | head -1)
245+ LINUX_BUNDLE=$(find release -name '*_amd64.AppImage' ! -name '*.sig' | head -1)
246+ [ -z "$LINUX_BUNDLE" ] && LINUX_BUNDLE=$(find release -name '*_amd64.AppImage.tar.gz' ! -name '*.sig' | head -1)
247+ MACOS_ARM_BUNDLE=$(find release -name '*_aarch64.app.tar.gz' ! -name '*.sig' | head -1)
248+ MACOS_X64_BUNDLE=$(find release -name '*_x64.app.tar.gz' ! -name '*.sig' | head -1)
249+ WINDOWS_BUNDLE=$(find release -name '*_x64-setup.exe' ! -name '*.sig' | head -1)
250+
251+ # Fail loudly if an updater bundle is missing — an empty URL in
252+ # latest.json silently breaks auto-update for that platform.
253+ for f in "$LINUX_BUNDLE" "$MACOS_ARM_BUNDLE" "$MACOS_X64_BUNDLE" "$WINDOWS_BUNDLE"; do
254+ if [ -z "$f" ] || [ -z "$(sig "$f")" ]; then
255+ echo "::error::Missing updater bundle or signature (linux='$LINUX_BUNDLE' macos-arm='$MACOS_ARM_BUNDLE' macos-x64='$MACOS_X64_BUNDLE' windows='$WINDOWS_BUNDLE')"
256+ exit 1
257+ fi
258+ done
230259
231260 jq -n \
232261 --arg ver "${VERSION#v}" \
233262 --arg date "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
234- --arg lu "${BASE}/$(basename "$LINUX_TAR ")" \
235- --arg ls "$(sig "$LINUX_TAR ")" \
236- --arg mau "${BASE}/$(basename "$MACOS_ARM_TAR ")" \
237- --arg mas "$(sig "$MACOS_ARM_TAR ")" \
238- --arg mxu "${BASE}/$(basename "$MACOS_X64_TAR ")" \
239- --arg mxs "$(sig "$MACOS_X64_TAR ")" \
240- --arg wu "${BASE}/$(basename "$WINDOWS_ZIP ")" \
241- --arg ws "$(sig "$WINDOWS_ZIP ")" \
263+ --arg lu "${BASE}/$(basename "$LINUX_BUNDLE ")" \
264+ --arg ls "$(sig "$LINUX_BUNDLE ")" \
265+ --arg mau "${BASE}/$(basename "$MACOS_ARM_BUNDLE ")" \
266+ --arg mas "$(sig "$MACOS_ARM_BUNDLE ")" \
267+ --arg mxu "${BASE}/$(basename "$MACOS_X64_BUNDLE ")" \
268+ --arg mxs "$(sig "$MACOS_X64_BUNDLE ")" \
269+ --arg wu "${BASE}/$(basename "$WINDOWS_BUNDLE ")" \
270+ --arg ws "$(sig "$WINDOWS_BUNDLE ")" \
242271 '{
243272 version: $ver, pub_date: $date,
244273 platforms: {
0 commit comments