diff --git a/README.md b/README.md index c54866b..a1f1739 100644 --- a/README.md +++ b/README.md @@ -6,24 +6,41 @@ This repo contains the **bare minimum code** to have an auto-updating Electron a Install Xcode (from the App Store), then follow [these instructions](https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html#//apple_ref/doc/uid/TP40012582-CH31-SW6) to make sure you have a "Mac Developer" certificate. If you'd like to export the certificate (for automated building, for instance) [you can](https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html#//apple_ref/doc/uid/TP40012582-CH31-SW7). You would then follow [these instructions](https://github.com/electron-userland/electron-builder/wiki/Code-Signing). -2. First, install necessary dependencies with: +2. Adjust `package.json` if needed. + + By default, `electron-updater` will try to detect the GitHub settings (such as the repo name and owner) from reading the `.git/config` or from reading other attributes within `package.json`. If the auto-detected settings are not what you want, configure the [`publish`](https://github.com/electron-userland/electron-builder/wiki/Publishing-Artifacts#PublishConfiguration) property as follows: + + { + ... + "build": { + "publish": [{ + "provider": "github", + "owner": "iffy", + "repo": "electron-updater-example" + }], + ... + } + } + +3. First, install necessary dependencies with: npm install -3. Generate a GitHub access token by going to . The access token should have the `repo` scope/permission. Once you have the token, assign it to an environment variable (on macOS/linux): +4. Generate a GitHub access token by going to . The access token should have the `repo` scope/permission. Once you have the token, assign it to an environment variable (on macOS/linux): export GH_TOKEN="" -4. Publish with the `publish.sh` script: +5. Publish with the `publish.sh` script: ./publish.sh -5. Release the release on GitHub by going to , editing the release and clicking "Publish release." +6. Release the release on GitHub by going to , editing the release and clicking "Publish release." + +7. Download and install the app from . -6. Download and install the app from . +8. Update the version in `package.json`, commit and push to GitHub. -7. Update the version in `package.json`, commit and push to GitHub. +9. Do steps 5 and 6 again. -8. Do steps 4 and 5 again. +10. Open the installed version of the app and see that it updates itself. -9. Open the installed version of the app and see that it updates itself.