Electron Autoupdater with Private GitHub Repository?

前端 未结 2 676
情话喂你
情话喂你 2021-02-06 18:02

I have implemented Electron AutoUpdater with PRIVATE GitHub Repository as provider to publish electron application. Now, i can publish it using GitHub repository but Whenever Au

2条回答
  •  暖寄归人
    2021-02-06 18:46

    Are you using electron auto-updater module? from the API documentation, I can see that they don't support.

    On the other hand, if you are using electron-updater module, make sure that you are following the recommended release workflow, and you should not use setFeedURL check the note here

    Updated:

    If you are using electron-updater and you are publishing to a private repository, you will need to make sure that your token will be available within the app-update.yml file, that's why many say it's not recommended, if the token is not set in your app-update.yml file you will get 404.

    For electron-updater to auto add your token to the app-update.yml file the token should be set within the publish section like the following:

      "publish": [
        {
          "provider": "github",
          "private": true,
          "owner": "",
          "repo": "",
          "token": ""
        }
      ],
    

    This will produce a app-update.yml file like the following:

    owner: 
    repo: 
    provider: github
    private: true
    token: 
    updaterCacheDirName: electron-updater-private-updater
    
    

    Check this small video

    Here is my code https://github.com/linuxjuggler/electron-auto-update-example check the electron-builder.json file.

    Update 2

    Based on the note mentioned in the Quick Setup Guide section, you should never call setFeedURL.

提交回复
热议问题