diff --git a/scripts/build-macos.js b/scripts/build-macos.js index 716c8293..45d51ac9 100755 --- a/scripts/build-macos.js +++ b/scripts/build-macos.js @@ -25,12 +25,12 @@ builder({ identity: !process.env.CI || process.env.CSC_LINK ? undefined : null, }, npmRebuild: process.env.ARCH !== 'arm64', - publish: process.env.GH_TOKEN ? { + publish: process.env.GH_TOKEN || process.env.GITHUB_TOKEN ? { provider: 'github', channel: `latest-${process.env.ARCH}`, } : undefined, }, - publish: isTag ? 'always' : 'onTagOrDraft', + publish: ( process.env.GH_TOKEN || process.env.GITHUB_TOKEN ) ? ( isTag ? 'always' : 'onTagOrDraft' ) : 'never', }).catch(e => { console.error(e) process.exit(1) diff --git a/scripts/build-windows.js b/scripts/build-windows.js index 8d2154a2..ee29ffea 100755 --- a/scripts/build-windows.js +++ b/scripts/build-windows.js @@ -15,10 +15,10 @@ builder({ extraMetadata: { version: vars.version, }, - publish: process.env.GH_TOKEN ? { + publish: process.env.GH_TOKEN || process.env.GITHUB_TOKEN ? { provider: 'github', channel: `latest-${process.arch}`, } : undefined, }, - publish: isTag ? 'always' : 'onTagOrDraft', + publish: ( process.env.GH_TOKEN || process.env.GITHUB_TOKEN ) ? ( isTag ? 'always' : 'onTagOrDraft' ) : 'never', }).catch(() => process.exit(1))