2020-07-27 16:27:33 +02:00
|
|
|
language: node_js
|
|
|
|
node_js: 12
|
|
|
|
|
|
|
|
before_install:
|
|
|
|
- npm install
|
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- node_modules
|
|
|
|
- app/node_modules
|
|
|
|
- $HOME/.cache/electron
|
|
|
|
- $HOME/.cache/electron-builder
|
|
|
|
- $HOME/.npm/_prebuilds
|
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- ELECTRON_CACHE=$HOME/.cache/electron
|
|
|
|
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
- stage: Test
|
|
|
|
script:
|
|
|
|
- npm test
|
2020-08-06 10:20:36 +02:00
|
|
|
- stage: Deploy Linux & Windows
|
2020-07-27 16:27:33 +02:00
|
|
|
if: tag IS present
|
2020-08-06 10:20:36 +02:00
|
|
|
os: linux
|
|
|
|
services: docker
|
2020-07-27 16:27:33 +02:00
|
|
|
script:
|
2020-08-06 10:20:36 +02:00
|
|
|
- docker run --rm --env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|_TOKEN|_KEY|AWS_|STRIP|BUILD_') -v ${PWD}:/project -v ~/.cache/electron:/root/.cache/electron -v ~/.cache/electron-builder:/root/.cache/electron-builder electronuserland/builder:wine /bin/bash -c "npm run build -- --linux --win -p always"
|
2020-07-27 16:27:33 +02:00
|
|
|
before_cache:
|
|
|
|
- rm -rf $HOME/.cache/electron-builder/wine
|
2020-08-06 10:20:36 +02:00
|
|
|
- stage: Deploy Mac
|
2020-07-27 16:27:33 +02:00
|
|
|
if: tag IS present
|
2020-08-06 10:20:36 +02:00
|
|
|
os: osx
|
|
|
|
osx_image: xcode10.2
|
2020-07-27 16:27:33 +02:00
|
|
|
script:
|
2020-08-06 10:20:36 +02:00
|
|
|
- npm run build -- -p always
|