matrix:
  include:
  - os: linux
    env: BUILD_FOR=linux
  - os: osx
    env: BUILD_FOR=macos

language: node_js
node_js: 7

cache:
  directories:
    - node_modules
    - app/node_modules

before_install:
    - npm i
    - scripts/install-deps.js

script:
    - scripts/build-native.js
    - npm run build
    - scripts/prepackage-plugins.js
    - scripts/build-$BUILD_FOR.js

dist: trusty
sudo: false

addons:
  apt:
    packages:
    - rpm
    - wine
    - mono-runtime

deploy:
  provider: releases
  api_key: $GITHUB_TOKEN
  file_glob: true
  file: "dist/terminus*"
  skip_cleanup: true
  on:
    tags: true
