From 28975e68ac947da41abf34bdff868e29173db0de Mon Sep 17 00:00:00 2001 From: Anubhav <35621759+anubh-v@users.noreply.github.com> Date: Sun, 26 Sep 2021 14:27:47 +0800 Subject: [PATCH] electron-builder:Set publish option to 'never' (#790) We're using the electron-builder tool to build the Electron application for all 3 major OS, in our automated release workflow. electron-builder has a default "publish" feature, where it tries to upload the built application to GitHub if it detects that we're building the application in a GitHub CI environment. It requires the "GH_TOKEN" to be defined in the environment, in order to use this feature. We're not actually using this publish feature, as we use another GitHub action to upload the applications. But since we recently removed the "GH_TOKEN" from our deployment workflow file, electron-builder complains about the missing "GH_TOKEN" and stops building the application. Let's configure electron-builder's "publish" option to "never", in the commands used for building the application, so that electron-builder does not try to publish the application. --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index bcfe9348c..4655b60d2 100644 --- a/package.json +++ b/package.json @@ -20,9 +20,9 @@ "electron:serve-tsc": "tsc -p tsconfig-serve.json", "electron:serve": "wait-on http-get://localhost:4200/ && npm run electron:serve-tsc && electron . --serve", "electron:local": "npm run build:prod && electron .", - "electron:linux": "npm run build:prod && electron-builder build --linux", - "electron:windows": "npm run build:prod && electron-builder build --windows", - "electron:mac": "npm run build:prod && electron-builder build --mac", + "electron:linux": "npm run build:prod && electron-builder build --linux --publish never", + "electron:windows": "npm run build:prod && electron-builder build --windows --publish never", + "electron:mac": "npm run build:prod && electron-builder build --mac --publish never", "test": "npm run codegen:gql && ng test", "e2e": "npm run codegen:gql && npm run postinstall:web && ng e2e", "actions:e2e": "npm run codegen:gql && npm run postinstall:web && ng e2e --protractor-config=e2e/protractor.gh-actions.conf --webdriver-update=false",