Skip to content

Commit

Permalink
Fix Build on MacOS and Win
Browse files Browse the repository at this point in the history
Fix build if GH_TOKEN or GITHUB_TOKEN is null on Mac OS and Windows
  • Loading branch information
Jai-JAP authored and Eugeny committed Sep 4, 2022
1 parent 39b4cca commit 6fbb2a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scripts/build-macos.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions scripts/build-windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -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))

0 comments on commit 6fbb2a2

Please sign in to comment.