2017-05-01 06:01:12 +08:00
|
|
|
#!/usr/bin/env node
|
|
|
|
const builder = require('electron-builder').build
|
|
|
|
const vars = require('./vars')
|
|
|
|
|
2019-08-27 16:33:30 +08:00
|
|
|
const isTag = (process.env.GITHUB_REF || process.env.BUILD_SOURCEBRANCH || '').startsWith('refs/tags/')
|
2019-08-27 05:52:20 +08:00
|
|
|
const isCI = !!process.env.GITHUB_REF
|
2019-07-04 20:08:47 +08:00
|
|
|
|
2017-05-01 06:01:12 +08:00
|
|
|
builder({
|
2019-07-04 20:08:47 +08:00
|
|
|
dir: true,
|
2020-02-13 01:48:18 +08:00
|
|
|
win: ['nsis', 'zip'],
|
2019-07-04 20:08:47 +08:00
|
|
|
config: {
|
|
|
|
extraMetadata: {
|
|
|
|
version: vars.version,
|
|
|
|
},
|
2018-08-10 03:47:38 +08:00
|
|
|
},
|
2019-08-27 16:33:30 +08:00
|
|
|
publish: isTag ? 'always' : 'onTag',
|
2019-06-27 17:47:57 +08:00
|
|
|
}).catch(() => process.exit(1))
|