Skip to content

Commit b8b4f25

Browse files
committed
ci(release): universal mac build, linux deb deps, on-demand cache refresh
Three improvements that all kick in on the next release tag: * electron mac target: arch=universal so one DMG runs on Apple Silicon AND Intel. ~2x file size, ~5 min slower job, kills the "M1-only build" footgun for the ~30% of Mac users still on Intel. * Linux step apt-installs fakeroot + dpkg before electron-builder. Without fakeroot the .deb target silently no-ops, which is why v1.0.3 only shipped an AppImage despite the config asking for both. * New revalidate-landing job: POSTs to the landing's /api/revalidate endpoint after a successful build so visitors don't wait out the 10-minute ISR window. Skips with a notice if LANDING_REVALIDATE_URL / LANDING_REVALIDATE_SECRET aren't set, so forks don't break.
1 parent 92c195c commit b8b4f25

2 files changed

Lines changed: 35 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ jobs:
6565
- name: Install dependencies
6666
run: npm ci --no-audit --no-fund
6767

68+
- name: Install Linux packaging deps
69+
# electron-builder shells out to `fakeroot` + `dpkg-deb` for the
70+
# .deb target. fakeroot isn't on ubuntu-latest by default, so the
71+
# deb step silently no-ops without it (AppImage still builds).
72+
if: matrix.os == 'ubuntu-latest'
73+
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends fakeroot dpkg
74+
6875
- name: Build all workspaces
6976
run: npm run build
7077

@@ -91,3 +98,29 @@ jobs:
9198
electron/dist-build/*.blockmap
9299
retention-days: 7
93100
if-no-files-found: warn
101+
102+
revalidate-landing:
103+
# Tells the landing site (miqaaat.com / miqaat.develop-better-solutions.com)
104+
# to drop its ISR cache and refetch the GitHub Releases API right
105+
# now — without this, visitors wait up to 10 minutes after a release
106+
# for the new download URLs to appear. Skipped if the secrets aren't
107+
# set, so a fresh fork doesn't fail this step.
108+
name: Refresh landing cache
109+
runs-on: ubuntu-latest
110+
needs: build
111+
if: success()
112+
steps:
113+
- name: POST to landing /api/revalidate
114+
env:
115+
URL: ${{ secrets.LANDING_REVALIDATE_URL }}
116+
SECRET: ${{ secrets.LANDING_REVALIDATE_SECRET }}
117+
run: |
118+
if [ -z "$URL" ] || [ -z "$SECRET" ]; then
119+
echo "::notice::LANDING_REVALIDATE_URL or LANDING_REVALIDATE_SECRET not set — skipping cache refresh"
120+
exit 0
121+
fi
122+
# Failure is non-fatal — the release is already published; the
123+
# landing will catch up on its own within the ISR window.
124+
curl -fsSL --max-time 15 -X POST "$URL?secret=$SECRET" \
125+
&& echo "Landing cache refreshed" \
126+
|| echo "::warning::Landing revalidation failed (non-fatal)"

electron/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@
7474
},
7575
"mac": {
7676
"target": [
77-
"dmg",
78-
"zip"
77+
{ "target": "dmg", "arch": "universal" },
78+
{ "target": "zip", "arch": "universal" }
7979
],
8080
"icon": "resources/icon.png",
8181
"identity": null,

0 commit comments

Comments
 (0)