electron / update.electronjs.org

📡 A free service that makes it easy for open-source Electron apps to update themselves.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding more details about the steps in the readme for newcomers

AoDev opened this issue · comments

commented

In the readme, it is said:

Make sure that:

Your builds are published to GitHub Releases
Your builds are code-signed

It would be useful to give more details about these.
Speaking as a newcomer to this kind of release flow.

  • "Github releases": do we need to attach / add the binaries to each drafted release? Or is the code somehow pulled, built and magically hosted?

  • "code-signed": how can one do this properly? some link and/or details?
    For example, electron-builder has this doc

Great feedback, @AoDev. Thanks for posting. There is definitely room for improvement here.

Your builds are code-signed

Here's a PR that kicks off a code-signing tutorial: electron/electron#12767 -- once we get that landed we can link to it from here.

Your builds are published to GitHub Releases

You have to publish your built application to GitHub Releases. The service expects to find a .zip file for macOS, and a .exe for Windows. That should be better documented. I think the best place for that may be the autoUpdater API docs: https://github.com/electron/electron/blob/master/docs/api/auto-updater.md

commented

Thanks for the quick reply. The code-sign PR is cool, I'll look at it with more attention. :)

For the Github Releases part, is there something I can do, apart from asking questions?

Note that I have an open source pet project that I will use with this (awesome) service. But, I am actually interested in the same kind of service for a private repo, possibly commercial app. I don't want to go off topic, but if it's just a zip or an exe added to a Github release, can't people just create a "release repo", where they add the binaries to the releases, without putting actual code in the repo? Would that be a fair use of the service or something you wish not to happen?

can't people just create a "release repo", where they add the binaries to the releases

I hadn't considered that, but it's a great idea!

open source pet project

It looks like your project is using electron-builder. If you've already got that working, you may want to look into using it's built-in updater mechanism: https://www.electron.build/auto-update

Another details question... I'm guessing the repo has to be set in the package.json like so...

"repository": {
    "type": "git",
    "url": "https://github.com/Cogulator/Cogulator.git"
  }

Is that correct, and is that the only place it needs to be set? Thanks much.

@Tapestes if you're using the update-electron-app module, then yes the repo is read from your package.json file. It can also be in this form:

"repository": "https://github.com/Cogulator/Cogulator"

... both are supported.