Loading...
Loading...
Guides Electron app release process including build, code signing, notarization, and GitHub Release with auto-update support. Use when releasing Electron apps, creating DMG installers, setting up auto-update, or troubleshooting notarization issues.
npx skill4agent add laststance/skills electron-release| Stack | Platform | Build Type | Status |
|---|---|---|---|
| Vite + electron-builder | macOS | Local | ✅ Documented |
| Other configurations | - | - | 📝 To be added |
# 1. Build with notarization
APPLE_KEYCHAIN_PROFILE=your-profile pnpm build:mac
# 2. Rename ZIPs (GitHub converts spaces to dots)
cp "dist/App Name-X.Y.Z-arm64-mac.zip" "dist/App-Name-X.Y.Z-arm64-mac.zip"
cp "dist/App Name-X.Y.Z-mac.zip" "dist/App-Name-X.Y.Z-mac.zip"
# 3. Create release with ALL files
gh release create vX.Y.Z \
dist/latest-mac.yml \
"dist/App-Name-X.Y.Z-arm64-mac.zip" \
"dist/App-Name-X.Y.Z-mac.zip" \
dist/app-name-X.Y.Z-arm64.dmg \
dist/app-name-X.Y.Z-x64.dmg \
--title "vX.Y.Z" --notes "Release notes..."package.jsongit add package.json
git commit -m "chore(release): bump version to X.Y.Z"
git push origin mainAPPLE_KEYCHAIN_PROFILE=your-profile pnpm build:mac| Env Var | Purpose |
|---|---|
| Keychain profile for notarization |
Alternative: | Direct credentials |
ls -la dist/*.dmg dist/*.zip dist/*.ymllatest-mac.ymlApp Name-X.Y.Z-arm64-mac.zipApp Name-X.Y.Z-mac.zipapp-name-X.Y.Z-arm64.dmgapp-name-X.Y.Z-x64.dmg# GitHub converts spaces to dots, but latest-mac.yml expects hyphens
cp "dist/App Name-X.Y.Z-arm64-mac.zip" "dist/App-Name-X.Y.Z-arm64-mac.zip"
cp "dist/App Name-X.Y.Z-mac.zip" "dist/App-Name-X.Y.Z-mac.zip"latest-mac.ymlcat dist/latest-mac.yml
# Check that 'url:' entries match your renamed ZIP filenamesgh release create vX.Y.Z \
dist/latest-mac.yml \
"dist/App-Name-X.Y.Z-arm64-mac.zip" \
"dist/App-Name-X.Y.Z-mac.zip" \
dist/app-name-X.Y.Z-arm64.dmg \
dist/app-name-X.Y.Z-x64.dmg \
--title "vX.Y.Z" \
--notes "$(cat <<'EOF'
## What's Changed
- Feature 1
- Bug fix 2
EOF
)"gh release view vX.Y.Z --json assets --jq '.assets[].name'| File | Purpose | Missing = |
|---|---|---|
| Version + SHA512 hashes | "No updates available" |
| ARM64 update payload | Download fails on M1/M2/M3 |
| x64 update payload | Download fails on Intel |
| Manual download | No manual install option |
| Mistake | Symptom | Fix |
|---|---|---|
| DMG only, no ZIP | Auto-update silently fails | Upload all ZIP files |
Missing | "No updates available" | Upload |
| Wrong ZIP filename | Download error | Rename to match |
| No notarization env var | Gatekeeper blocks app | Set |
| Spaces in filename | 404 on download | Rename: spaces → hyphens |
# Check if filenames match
cat dist/latest-mac.yml | grep url:
gh release view vX.Y.Z --json assets --jq '.assets[].name'
# URLs in yml must exactly match asset names# Verify latest-mac.yml is uploaded
gh release view vX.Y.Z --json assets --jq '.assets[].name' | grep yml# Rebuild with notarization
APPLE_KEYCHAIN_PROFILE=your-profile pnpm build:mac
# Check build log for "notarization successful"mac:
target:
- target: dmg
arch: [arm64, x64]
- target: zip
arch: [arm64, x64]
notarize: true
hardenedRuntime: true
publish:
provider: github
owner: your-org
repo: your-repolatest-mac.yml