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: - https://github.com/electron-userland/electron-builder/issues/5592 - https://github.com/electron-userland/electron-builder/issues/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>
This commit is contained in:
@@ -101,6 +101,8 @@ jobs:
|
||||
path: |
|
||||
apps/frontend/dist/*.dmg
|
||||
apps/frontend/dist/*.zip
|
||||
apps/frontend/dist/*.yml
|
||||
apps/frontend/dist/*.blockmap
|
||||
|
||||
# Apple Silicon build on ARM64 runner for native compilation
|
||||
build-macos-arm64:
|
||||
@@ -186,6 +188,8 @@ jobs:
|
||||
path: |
|
||||
apps/frontend/dist/*.dmg
|
||||
apps/frontend/dist/*.zip
|
||||
apps/frontend/dist/*.yml
|
||||
apps/frontend/dist/*.blockmap
|
||||
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
@@ -248,6 +252,8 @@ jobs:
|
||||
name: windows-builds
|
||||
path: |
|
||||
apps/frontend/dist/*.exe
|
||||
apps/frontend/dist/*.yml
|
||||
apps/frontend/dist/*.blockmap
|
||||
|
||||
build-linux:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -317,6 +323,8 @@ jobs:
|
||||
apps/frontend/dist/*.AppImage
|
||||
apps/frontend/dist/*.deb
|
||||
apps/frontend/dist/*.flatpak
|
||||
apps/frontend/dist/*.yml
|
||||
apps/frontend/dist/*.blockmap
|
||||
|
||||
create-release:
|
||||
needs: [build-macos-intel, build-macos-arm64, build-windows, build-linux]
|
||||
@@ -336,16 +344,30 @@ jobs:
|
||||
- name: Flatten and validate artifacts
|
||||
run: |
|
||||
mkdir -p release-assets
|
||||
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/ \;
|
||||
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/ \;
|
||||
|
||||
# Validate that at least one artifact was copied
|
||||
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)
|
||||
if [ "$artifact_count" -eq 0 ]; then
|
||||
echo "::error::No build artifacts found! Expected .dmg, .zip, .exe, .AppImage, .deb, or .flatpak files."
|
||||
# Validate that installer files exist (not just manifests)
|
||||
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)
|
||||
if [ "$installer_count" -eq 0 ]; then
|
||||
echo "::error::No installer artifacts found! Expected .dmg, .zip, .exe, .AppImage, .deb, or .flatpak files."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Found $artifact_count artifact(s):"
|
||||
echo "Found $installer_count installer(s):"
|
||||
find release-assets -type f \( -name "*.dmg" -o -name "*.zip" -o -name "*.exe" -o -name "*.AppImage" -o -name "*.deb" -o -name "*.flatpak" \) -exec basename {} \;
|
||||
|
||||
# Validate that electron-updater manifest files are present (required for auto-updates)
|
||||
yml_count=$(find release-assets -type f -name "*.yml" | wc -l)
|
||||
if [ "$yml_count" -eq 0 ]; then
|
||||
echo "::error::No update manifest (.yml) files found! Auto-update architecture detection will not work."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Found $yml_count manifest file(s):"
|
||||
find release-assets -type f -name "*.yml" -exec basename {} \;
|
||||
|
||||
echo ""
|
||||
echo "All release assets:"
|
||||
ls -la release-assets/
|
||||
|
||||
- name: Generate checksums
|
||||
|
||||
Reference in New Issue
Block a user