Electron | Automatic updates implemented for each release and pre-configured application for windows #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
owner
property to the username you use on github.repo
repository name on github.and make value changes in the properties
appId
, andproductName
.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?
Before generating the icons you should go to the package.json and change the
--input
path where the icon is locatedthen ...
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
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