This commit is contained in:
Eugene Pankov 2019-07-04 14:08:47 +02:00
parent 5596dce8ef
commit 6e845eff7d
4 changed files with 29 additions and 22 deletions

View File

@ -9,6 +9,7 @@ stages:
jobs:
include:
- stage: 'Build'
if: branch = xxx
os: linux
before_install:
- set -e
@ -39,7 +40,7 @@ jobs:
- stage: 'Docs'
os: linux
if: branch = xxx
if: branch = master
script:
- set -e
- openssl aes-256-cbc -K $encrypted_4e2fb4889ef8_key -iv $encrypted_4e2fb4889ef8_iv -in .travis.ssh.key.enc -out .travis.ssh.key -d

View File

@ -2,6 +2,8 @@
const builder = require('electron-builder').build
const vars = require('./vars')
const isTag = (process.env.BUILD_SOURCEBRANCH || '').startsWith('refs/tags/')
builder({
dir: true,
linux: ['snap', 'deb', 'rpm', 'tar.gz'],
@ -10,5 +12,5 @@ builder({
version: vars.version,
},
},
publish: 'onTag',
publish: isTag ? 'always' : 'onTag',
}).catch(() => process.exit(1))

View File

@ -2,6 +2,8 @@
const builder = require('electron-builder').build
const vars = require('./vars')
const isTag = (process.env.BUILD_SOURCEBRANCH || '').startsWith('refs/tags/')
builder({
dir: true,
mac: ['pkg', 'zip'],
@ -10,5 +12,5 @@ builder({
version: vars.version,
},
},
publish: 'onTag',
publish: isTag ? 'always' : 'onTag',
}).catch(() => process.exit(1))

View File

@ -2,6 +2,8 @@
const builder = require('electron-builder').build
const vars = require('./vars')
const isTag = (process.env.BUILD_SOURCEBRANCH || '').startsWith('refs/tags/')
builder({
dir: true,
win: ['nsis', 'portable'],
@ -10,5 +12,5 @@ builder({
version: vars.version,
},
},
publish: 'onTag',
publish: isTag ? 'always' : 'onTag',
}).catch(() => process.exit(1))