Skip to content

Commit f7b02e8

Browse files
hluisiAndyMik90
andauthored
fix(ci): include update manifests for architecture-specific auto-updates (#611)
* fix(ci): include update manifests in release artifacts electron-updater requires .yml and .blockmap files to perform architecture-specific updates on macOS (arm64 vs x64). Without these files: - Auto-updater can't detect architecture - ARM Macs may download Intel builds (run under Rosetta) - Delta updates don't work This fix ensures electron-updater can: - Detect correct architecture (arm64 vs x64) - Download architecture-specific builds - Perform efficient delta updates via blockmap files References: - electron-userland/electron-builder#5592 - electron-userland/electron-builder#7975 Signed-off-by: Hunter Luisi <hluisi@gmail.com> * fix(ci): copy yml and blockmap files to release assets The previous commit added yml/blockmap to artifact uploads, but the 'Flatten and validate artifacts' step wasn't copying them to the release-assets directory. Without this fix, the manifest files wouldn't be included in the GitHub release, making the architecture detection fix ineffective. Thanks to @coderabbitai for catching this! Signed-off-by: Hunter Luisi <hluisi@gmail.com> * fix(ci): add validation for electron-updater manifest files Adds explicit check that .yml manifest files are present in release assets. Issues a warning if no manifests found, helping catch cases where electron-builder fails to generate them. * fix(ci): separate installer and manifest validation - Add separate check for installer files (dmg, zip, exe, etc.) to prevent releases with only manifest files and no installers - Change missing yml from warning to error since manifests are required for auto-update architecture detection to work - Improve output formatting to show installers and manifests separately Addresses review feedback from Auto Claude PR Review. --------- Signed-off-by: Hunter Luisi <hluisi@gmail.com> Co-authored-by: Andy <119136210+AndyMik90@users.noreply.github.com>
1 parent 4ec9db8 commit f7b02e8

1 file changed

Lines changed: 28 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ jobs:
101101
path: |
102102
apps/frontend/dist/*.dmg
103103
apps/frontend/dist/*.zip
104+
apps/frontend/dist/*.yml
105+
apps/frontend/dist/*.blockmap
104106
105107
# Apple Silicon build on ARM64 runner for native compilation
106108
build-macos-arm64:
@@ -186,6 +188,8 @@ jobs:
186188
path: |
187189
apps/frontend/dist/*.dmg
188190
apps/frontend/dist/*.zip
191+
apps/frontend/dist/*.yml
192+
apps/frontend/dist/*.blockmap
189193
190194
build-windows:
191195
runs-on: windows-latest
@@ -248,6 +252,8 @@ jobs:
248252
name: windows-builds
249253
path: |
250254
apps/frontend/dist/*.exe
255+
apps/frontend/dist/*.yml
256+
apps/frontend/dist/*.blockmap
251257
252258
build-linux:
253259
runs-on: ubuntu-latest
@@ -317,6 +323,8 @@ jobs:
317323
apps/frontend/dist/*.AppImage
318324
apps/frontend/dist/*.deb
319325
apps/frontend/dist/*.flatpak
326+
apps/frontend/dist/*.yml
327+
apps/frontend/dist/*.blockmap
320328
321329
create-release:
322330
needs: [build-macos-intel, build-macos-arm64, build-windows, build-linux]
@@ -336,16 +344,30 @@ jobs:
336344
- name: Flatten and validate artifacts
337345
run: |
338346
mkdir -p release-assets
339-
find dist -type f \( -name "*.dmg" -o -name "*.zip" -o -name "*.exe" -o -name "*.AppImage" -o -name "*.deb" -o -name "*.flatpak" \) -exec cp {} release-assets/ \;
347+
find dist -type f \( -name "*.dmg" -o -name "*.zip" -o -name "*.exe" -o -name "*.AppImage" -o -name "*.deb" -o -name "*.flatpak" -o -name "*.yml" -o -name "*.blockmap" \) -exec cp {} release-assets/ \;
340348
341-
# Validate that at least one artifact was copied
342-
artifact_count=$(find release-assets -type f \( -name "*.dmg" -o -name "*.zip" -o -name "*.exe" -o -name "*.AppImage" -o -name "*.deb" -o -name "*.flatpak" \) | wc -l)
343-
if [ "$artifact_count" -eq 0 ]; then
344-
echo "::error::No build artifacts found! Expected .dmg, .zip, .exe, .AppImage, .deb, or .flatpak files."
349+
# Validate that installer files exist (not just manifests)
350+
installer_count=$(find release-assets -type f \( -name "*.dmg" -o -name "*.zip" -o -name "*.exe" -o -name "*.AppImage" -o -name "*.deb" -o -name "*.flatpak" \) | wc -l)
351+
if [ "$installer_count" -eq 0 ]; then
352+
echo "::error::No installer artifacts found! Expected .dmg, .zip, .exe, .AppImage, .deb, or .flatpak files."
345353
exit 1
346354
fi
347355
348-
echo "Found $artifact_count artifact(s):"
356+
echo "Found $installer_count installer(s):"
357+
find release-assets -type f \( -name "*.dmg" -o -name "*.zip" -o -name "*.exe" -o -name "*.AppImage" -o -name "*.deb" -o -name "*.flatpak" \) -exec basename {} \;
358+
359+
# Validate that electron-updater manifest files are present (required for auto-updates)
360+
yml_count=$(find release-assets -type f -name "*.yml" | wc -l)
361+
if [ "$yml_count" -eq 0 ]; then
362+
echo "::error::No update manifest (.yml) files found! Auto-update architecture detection will not work."
363+
exit 1
364+
fi
365+
366+
echo "Found $yml_count manifest file(s):"
367+
find release-assets -type f -name "*.yml" -exec basename {} \;
368+
369+
echo ""
370+
echo "All release assets:"
349371
ls -la release-assets/
350372
351373
- name: Generate checksums

0 commit comments

Comments
 (0)