branches:
  only:
    - master
    - /^v.*$/

language: node_js
node_js: 14

git:
  depth: false
  quiet: true

jobs:
  include:
    - os: windows
      env: PATH=/c/Python37:/c/Python37/Scripts:$PATH
      before_install:
        - choco install python
        - npm install -g node-gyp

    - os: linux
      before_install: npm install -g node-gyp

install: npm ci --no-prebuild

after_success: node script/prebuild.js pack

deploy:
  skip_cleanup: true
  provider: releases
  api_key: $GITHUB_TOKEN
  file_glob: true
  file: prebuilds/*
  on:
    tags: true
