electron-release

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.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "electron-release" with this command: npx skills add laststance/skills/laststance-skills-electron-release

Electron Release Guide

Complete release workflow for Electron applications with auto-update support.

Supported Configurations

StackPlatformBuild TypeStatus
Vite + electron-buildermacOSLocal✅ Documented
Other configurations--📝 To be added

Quick Start (macOS + Vite + electron-builder)

# 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..."

Complete Workflow

Phase 1: Pre-Release

  1. Update version in package.json
  2. Commit version bump:
    git add package.json
    git commit -m "chore(release): bump version to X.Y.Z"
    git push origin main
    

Phase 2: Build

  1. Build with notarization:

    APPLE_KEYCHAIN_PROFILE=your-profile pnpm build:mac
    
    Env VarPurpose
    APPLE_KEYCHAIN_PROFILEKeychain profile for notarization
    Alternative: APPLE_ID, APPLE_APP_SPECIFIC_PASSWORD, APPLE_TEAM_IDDirect credentials
  2. Verify build output:

    ls -la dist/*.dmg dist/*.zip dist/*.yml
    

    Expected files:

    • latest-mac.yml - Auto-update metadata
    • App Name-X.Y.Z-arm64-mac.zip - ARM64 update payload
    • App Name-X.Y.Z-mac.zip - x64 update payload
    • app-name-X.Y.Z-arm64.dmg - ARM64 installer
    • app-name-X.Y.Z-x64.dmg - x64 installer

Phase 3: Prepare Release Assets

  1. Rename ZIP files (critical for auto-update):

    # 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"
    
  2. Verify latest-mac.yml URLs match renamed files:

    cat dist/latest-mac.yml
    # Check that 'url:' entries match your renamed ZIP filenames
    

Phase 4: GitHub Release

  1. Create release with all required 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 "$(cat <<'EOF'
    ## What's Changed
    - Feature 1
    - Bug fix 2
    EOF
    )"
    
  2. Verify release assets:

    gh release view vX.Y.Z --json assets --jq '.assets[].name'
    

Required Files for Auto-Update

FilePurposeMissing =
latest-mac.ymlVersion + SHA512 hashes"No updates available"
*-arm64-mac.zipARM64 update payloadDownload fails on M1/M2/M3
*-mac.zipx64 update payloadDownload fails on Intel
*.dmgManual downloadNo manual install option

Common Mistakes

MistakeSymptomFix
DMG only, no ZIPAuto-update silently failsUpload all ZIP files
Missing latest-mac.yml"No updates available"Upload latest-mac.yml
Wrong ZIP filenameDownload errorRename to match latest-mac.yml URLs
No notarization env varGatekeeper blocks appSet APPLE_KEYCHAIN_PROFILE
Spaces in filename404 on downloadRename: spaces → hyphens

Troubleshooting

"Download error" on auto-update

# 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

"No updates available"

# Verify latest-mac.yml is uploaded
gh release view vX.Y.Z --json assets --jq '.assets[].name' | grep yml

Gatekeeper blocks app

# Rebuild with notarization
APPLE_KEYCHAIN_PROFILE=your-profile pnpm build:mac
# Check build log for "notarization successful"

electron-builder.yml Reference

mac:
  target:
    - target: dmg
      arch: [arm64, x64]
    - target: zip
      arch: [arm64, x64]
  notarize: true
  hardenedRuntime: true

publish:
  provider: github
  owner: your-org
  repo: your-repo

Success Criteria

  • Build completes with "notarization successful"
  • All 5 files uploaded to GitHub Release
  • ZIP filenames match latest-mac.yml URLs exactly
  • Test: older version detects update
  • Test: download and install succeeds

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

coderabbit-resolver

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

code-trace

No summary provided by upstream source.

Repository SourceNeeds Review
General

product-inspiration

No summary provided by upstream source.

Repository SourceNeeds Review
General

gif-analyzer

No summary provided by upstream source.

Repository SourceNeeds Review