version: 2.1

orbs:
  win: circleci/windows@2.3.0

jobs:
  build_linux:
    docker:
      - image: electronuserland/builder:12
    steps:
      - checkout
      - run: apt-get update && apt-get install -y libxss-dev
      - run: npm install -g node-gyp prebuild
      - run: npm install
      - run: prebuild --all -r napi --strip -u $GH_TOKEN


  build_windows:
    executor: win/default # executor type
    steps:
      - checkout
      - run: npm install --global --production windows-build-tools --vs2015
      - run: npm install -g node-gyp prebuild
      - run: npm install
      - run: prebuild --all -r napi --strip -u $env:GH_TOKEN

  build_macos:
    macos:
      xcode: "10.0.0"
    steps:
      - checkout
      - run: npm install
      - run: npm install -g node-gyp prebuild
      - run: prebuild --all -r napi --strip -u $GH_TOKEN

workflows:
  version: 2
  build:
    jobs:
      - build_windows
      - build_linux
#      - build_macos
