Table of contents

5. Publishing and Updating

Using update.electronjs.org

requirements

  • Your app runs on macOS or Windows
  • Your app has a public GitHub repository
  • Builds are published to GitHub releases
  • Builds are code signed

Publishing a GitHub release

a. Generating a personal access token

create a new personal access token(PAT) with the public_repo scope, which gives write access to your public repositories (repo 체크)
PAT는 저장해둬야 함.

web_application57.png

b. Setting up the GitHub Publisher

Installing the module
npm install --save-dev @electron-forge/publisher-github

실행화면

web_application58.png

Configuring the publisher in Forge
//forge.config.js
module.exports = {
  publishers: [
    {
      name: '@electron-forge/publisher-github',
      config: {
        repository: {
          owner: 'github-user-name',
          name: 'github-repo-name'
        },
        prerelease: false,
        draft: true
      }
    }
  ]
}

Running the publish command

package.json

//package.json
//...
  "scripts": {
    "start": "electron-forge start",
    "package": "electron-forge package",
    "make": "electron-forge make",
    "publish": "electron-forge publish"
  },
  //...

publish

npm run publish

github release(draft)

web_application62.png

publish release

web_application63.png

release done!

web_application64.png