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는 저장해둬야 함.
b. Setting up the GitHub Publisher
Installing the module
npm install --save-dev @electron-forge/publisher-github
실행화면
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