AUTO_UPDATE_SETUP.md 3.0 KB

🔄 Auto-Update System Setup - Complete!

Your kNotes desktop app now has full automatic update capabilities! Here's what has been implemented:

✅ What's Been Set Up

1. electron-updater Integration

  • ✅ Added electron-updater dependency
  • ✅ Configured auto-update checking in main.js
  • ✅ Added "Check for Updates" menu item
  • ✅ User-friendly update notifications and dialogs

2. GitHub Actions Workflow

  • ✅ Created .github/workflows/desktop-release.yml
  • ✅ Automatically triggers on frontend changes (src/main/resources/static/**)
  • ✅ Builds for all platforms: Windows, macOS, and Linux
  • ✅ Publishes to GitHub Releases automatically

3. Configuration Files

  • ✅ Updated package.json with publish settings
  • ✅ Added GitHub as update provider
  • ✅ Version bumped to 1.1.0 for first auto-update release

4. Helper Scripts

  • ✅ Created update-frontend.sh for local testing
  • ✅ Updated README with auto-update documentation

🚀 How It Works

Automatic Workflow:

  1. You make changes to frontend files in src/main/resources/static/
  2. Push to main branch → GitHub Actions detects changes
  3. Builds desktop apps for Windows, macOS, and Linux
  4. Creates GitHub Release with all platform binaries
  5. Users get notified when they open the app
  6. Updates download in background automatically
  7. One-click install when users are ready

Manual Testing:

# Update frontend files
./update-frontend.sh

# Build new version
npm run build-linux

# Test the app
./dist/kNotes-1.1.0.AppImage

📦 Current Build Status

  • Version: 1.1.0
  • AppImage: kNotes-1.1.0.AppImage (104.4 MB)
  • Auto-updater: ✅ Enabled and configured
  • GitHub Integration: ✅ Ready for releases

🔧 Update Process for Users

  1. App starts → Checks for updates automatically (3 seconds after startup)
  2. Update found → Shows notification: "Update available, downloading in background"
  3. Download complete → Shows dialog: "Update ready, restart now or later?"
  4. User restarts → App updates and relaunches with new version

📋 Next Steps

To Enable Auto-Updates:

  1. Push this desktop app code to your GitHub repository
  2. Make any frontend change in src/main/resources/static/
  3. Push to main → First auto-release will be created!
  4. Share the release with users

Repository Settings Needed:

  • Make sure GitHub Actions are enabled
  • Ensure GITHUB_TOKEN has release permissions (should be automatic)
  • Repository must be public or have appropriate permissions for releases

🎯 Benefits

  • Zero maintenance - Updates happen automatically
  • Always current - Desktop app stays in sync with web app
  • Cross-platform - Works on Windows, macOS, and Linux
  • User-friendly - Non-disruptive background updates
  • Secure - Uses GitHub's infrastructure and signing

Your desktop app is now fully equipped with professional-grade automatic updating! 🎉