Fix Build on MacOS and Win

Fix build if GH_TOKEN or GITHUB_TOKEN is null on Mac OS and Windows
This commit is contained in:
Jai A P 2022-08-30 11:40:10 +05:30 committed by Eugene
parent 39b4cca772
commit 6fbb2a2274
2 changed files with 4 additions and 4 deletions

View file

@ -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)

View file

@ -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))