Electron simplifies the development of cross-platform desktop apps. Unfortunately, packaging and releasing an Electron app for the different platforms is not a straightforward task. This post aims to guide you through the process

Packaging

electron-builder is a third-party tool that facilitates the process of packaging an Electron app. The tool handles various tasks required for building a production-ready app, like the inclusion of native dependencies, code signing, upload to a download server, and the inclusion of an auto-updater tool.

Run the following command to add electron-builder to your Electron project:

yarn add --dev electron-builder

Next, add the following scripts to your package.json file:

package.json "scripts:" : { "postinstall" : "electron-builder install-app-deps" , "build" : "electron-builder --mac --windows --linux" , "release" : "electron-builder --mac --windows --linux --publish always"