language: node_js
node_js: '10'
os:
  - linux
  - osx
dist: bionic
osx_image: xcode10.1

cache:
  npm: true
  yarn: true
  directories:
    - $HOME/.cache/electron

addons:
  apt:
    packages:
      - fakeroot
      - rpm

branches:
  only:
    - master
    - /^v\d+\.\d+\.\d+/

script:
  - npm run lint
  - if test -z "$TRAVIS_TAG"; then npm run make; fi
after_success: if test -n "$TRAVIS_TAG"; then npm run publish; fi
