Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electron | Automatic updates implemented for each release and pre-configured application for windows #19

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ChrisMichaelPerezSantiago

Automatic update for each release has been integrated, with pre-configuration for windows. It can also be configured for other platforms

vue.config.js

Predefined settings for windows, but can be configured for other platforms.

In the publish section you should change:

  • The value of the owner property to the username you use on github.
  • The property value repo repository name on github.

and make value changes in the properties appId, and productName.

to see available options, check out Electron Builder Configuration Options

GH_TOKEN

You should assign an environment variable called GH_TOKEN with the token that github provides you. This is mandatory as it will help to apply automatic updates. For more information visit the Auto Update section for more details.

How to release the application to github?

  • First, you must generate the icons that will be used as the logo of the executable icon and the application installation process.

Before generating the icons you should go to the package.json and change the --input path where the icon is located

"electron:generate-icons": "electron-icon-builder --input=./public/favicon-32x32.png --output=build --flatten",

then ...

yarn electron:generate-icons
  • Second, you should create the environment variable named GH_TOKEN and assign the value of the token that github provides you.

  • Then with the following command

yarn gh-publish GH_TOKEN

It will perform the build of the application and the release as draf. Now you should go to the repository and you will see that a release draf has created for you.

This is very useful because now the user should not go to the release section to download the new release of the application. It would only be enough to enter the application, and if there is a new version windows will show a notification to perform the update.

But yes, the user the first time should download the release from github. To see more releases the user will receive a notification to their computer to download the new version, without the need to go to github and download the release.

The documentation comes from a template that I had implemented with vue + electron, at the following URL

@ChrisMichaelPerezSantiago
Copy link
Author

Hi @w3cj ,

Sorry for the delay.
I had to open a new pull request, I think now you should have no problem merging the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant