Reputation: 1427
running the release
script without publish
option tries to publish the build to GitHub ( and fails while complaining about not being able to find GHToken! )
Error: GitHub Personal Access Token is not set, neither programmatically, nor using env "GH_TOKEN"
Setting "publish": "never"
will fail also complaining about not being able to find module electron-publisher-never
!
Error: Cannot find module 'electron-publisher-never'
It all happens while the project is built but build scripts exits non-zero!
I'm using the latest version of electron-builder. my build script:
"build": {
"appId": "eu.armand.[****]",
"copyright": "Copyright © 2017 mim_Armand",
"productName": "[****]",
"mac": {
"publish": "never",
"category": "public.app-category.[****]",
"icon": "assets/icons/mac/icon.icns"
}
Any idea what's going on or if I'm doing it wrong?!
,m
Upvotes: 3
Views: 3799
Reputation: 1
I solved it this way, because I didn't need to put it in any repository
"build":{
"appId": "XXX",
"productName": "XXX",
"directories":{
"output": "build"
},
"win":{
"target": "nsis",
"publish" : []
}
}
https://www.electron.build/configuration/publish
Upvotes: 0
Reputation: 1014
rename your script to something else.
if the script name is release
→ publish is set to always
the documentation states this:
CLI --publish option values:
...
If npm script namedrelease
, — always.
Add to scripts in the development package.json:
"release": "build"
and if you runyarn release
, a release will be drafted (if doesn’t already exist) and artifacts published.
Upvotes: 1
Reputation: 8202
try building with
"build": "electron-builder --publish never"
to never publish.
Upvotes: 4