language: node_js
node_js: node

os:
  - linux
  - osx
sudo: required
dist: trusty

env:
  npm_config_target: 1.2.3
  npm_config_arch: x64
  npm_config_target_arch: x64
  npm_config_disturl: https://atom.io/download/atom-shell
  npm_config_runtime: electron
  npm_config_build_from_source: true

addons:
  apt:
    packages:
      - icnsutils
      - graphicsmagick
      - xz-utils

cache:
  directories:
  - node_modules
  - app/node_modules
  - $HOME/.electron
  - $HOME/.cache

install:
- npm install electron-builder # force install next version to test electron-builder
- npm install
- npm prune

script:
- npm run release

branches:
  only:
    - v3