Using Electron-Builder 8.5.2, and building for Windows using Github as the release server. I'm trying to add support for auto-update on Windows using NSIS and Github for publishing new releases. The docs specify that a GH_TOKEN is needed, and I've seen examples for how to use it when utilizing something like Travis. However, I don't see documentation for how to pass the GH_TOKEN when no CI services are being used.
These are the docs I'm referring to:
https://github.com/electron-userland/electron-builder/wiki/Publishing-Artifacts
Inside of Package.JSON, I'm current passing the following under the build key:
"win": {
"target": ["nsis"],
"publish": ["github"]
},
What do I need to add for passing the token? (This is a private repo, so right now it's 404ing. It needs the token.)
GH_TOKEN it is env variable, so, just set it as any other env.
e.g. if you on mac, add export GH_TOKEN=yourToken to ~/.profile
This is a private repo, so right now it's 404ing. It needs the token
GitHub repo must be private. Please see https://github.com/electron-userland/electron-builder/issues/891#issuecomment-259210935