From 16b338729f9ddd38cf2d5d90f626ab80d47bcc9e Mon Sep 17 00:00:00 2001 From: Jai A P Date: Tue, 30 Aug 2022 11:50:32 +0530 Subject: [PATCH] Publish only if GH_TOKEN || GITHUB_TOKEN --- scripts/build-linux.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/build-linux.js b/scripts/build-linux.js index 841f5957..3bba59a2 100755 --- a/scripts/build-linux.js +++ b/scripts/build-linux.js @@ -16,12 +16,12 @@ builder({ extraMetadata: { version: vars.version, }, - publish: { - provider: 'github', - channel: `latest-${process.arch}`, - }, - }, - publish: isTag ? 'always' : 'onTagOrDraft', +        publish: process.env.GH_TOKEN || process.env.GITHUB_TOKEN ? { +             provider: 'github', +             channel: `latest-${process.env.ARCH}`, +         } : undefined, +     }, +      publish: ( process.env.GH_TOKEN || process.env.GITHUB_TOKEN ) ? ( isTag ? 'always' : 'onTagOrDraft' ) : 'never', }).catch(e => { console.error(e) process.exit(1)