This directory contains automated workflows for building and distributing Gazel.
File: workflows/build-macos.yml
Automatically builds, signs, and notarizes the macOS Electron app.
Triggers:
- Push to
mainormasterbranch - Pull requests (build only, no signing)
- Version tags (e.g.,
v1.0.0) - creates GitHub releases - Manual workflow dispatch
What it does:
- β Sets up macOS runner with Node.js and pnpm
- β Imports your Developer ID certificate
- β Configures Apple API key for notarization
- β Builds the Electron app
- β Signs the app with your Developer ID
- β Notarizes with Apple (2-10 minutes)
- β Creates distributable installers (ZIP/DMG)
- β Uploads artifacts (available for 30 days)
- β Creates GitHub releases for version tags
Artifacts produced:
Gazel-macOS-app- Signed .app bundleGazel-macOS-installer- Signed and notarized installer
- Read the setup guide: GITHUB_ACTIONS_SIGNING.md
- Follow the checklist: SECRETS_CHECKLIST.md
- Add 5 required secrets to your GitHub repository:
APPLE_CERTIFICATE_BASE64APPLE_CERTIFICATE_PASSWORDAPPLE_API_KEY_BASE64APPLE_API_KEY_IDAPPLE_API_ISSUER
After setup, the workflow runs automatically. To create a release:
# Tag your version
git tag v1.0.0
git push origin v1.0.0
# The workflow will:
# - Build and sign the app
# - Notarize with Apple
# - Create a GitHub release
# - Attach the signed installer# Push to main to trigger a build
git push origin main
# Or manually trigger from GitHub:
# Actions β Build and Sign macOS App β Run workflow# Create a test tag
git tag v0.0.1-test
git push origin v0.0.1-test
# Check the Actions tab for progress
# Check the Releases page for the created release- Go to the Actions tab in your repository
- Click on a workflow run to see details
- Expand each step to view logs
- Download artifacts from the workflow summary page
- Verify
APPLE_CERTIFICATE_BASE64is correctly encoded - Check
APPLE_CERTIFICATE_PASSWORDis correct - Ensure you exported the full certificate (not just public key)
- Check API key permissions in App Store Connect
- Verify
APPLE_API_KEY_IDandAPPLE_API_ISSUERare correct - Review workflow logs for specific Apple error messages
- Verify all 5 secrets are added (Settings β Secrets and variables β Actions)
- Check secret names match exactly (case-sensitive)
- Re-encode and re-add secrets if needed
- β All secrets are encrypted by GitHub
- β Secrets are never exposed in logs
- β Temporary keychain is created and deleted for each build
- β Sensitive files are cleaned up after build
- β Only repository admins can view/edit secrets
- GitHub Actions: Free for public repositories
- Private repositories: Included minutes vary by plan
- macOS runners: ~10x multiplier on minutes (e.g., 10 minutes = 100 minutes used)
- Typical build time: 10-15 minutes (including notarization)
Edit workflows/build-macos.yml:
on:
push:
branches:
- main
- develop # Add more brancheson:
schedule:
- cron: '0 0 * * 0' # Weekly on Sunday- uses: actions/upload-artifact@v4
with:
retention-days: 90 # Change from 30 to 90 days- π Complete Setup Guide
- β Secrets Checklist
- π§ Local Code Signing
- π Electron Forge Docs
- π Apple Notarization Guide
- π€ GitHub Actions Docs
If you encounter issues:
- Check the workflow logs in the Actions tab
- Review the troubleshooting sections in the guides
- Verify all secrets are correctly configured
- Test signing locally first:
source .env && yarn make - Open an issue with workflow logs attached