os: Visual Studio 2019

platform:
  - x64

branches:
  only:
  - master

version: '{build}-{branch}'

cache:
  - "node_modules"
  - "%LOCALAPPDATA%\\Yarn"

test: off

init:
  - cmd: echo 🚦 Verifying Build
  - ps: if ($env:OS -eq "Windows_NT" -And $env:DEPLOY_WINDOWS -eq "0") { $host.SetShouldExit(0) }

install:
  - cmd: echo 🔧 Preparing Build Environment (Git)
  - cmd: git config --global core.autocrlf input
  - cmd: echo 🔧 Preparing Build Environment (Node.js)
  - ps: Update-NodeJsInstallation 14.8.0 x64
  - cmd: npm --global install yarn

before_build:
  - cmd: echo 📥 Installing Dependencies
  - cmd: yarn install

build_script:
  - cmd: echo 📦 Building Project
  - cmd: npm run build

deploy_script:
  - cmd: echo 📮 Deploying Project
  - cmd: npm run deploy

artifacts:
  - path: build\output\*.exe

notifications:
  - provider: Webhook
    url: https://webhooks.gitter.im/e/65966d679f4ebeae4b3b
    method: GET
    on_build_success: true
    on_build_failure: true
    on_build_status_changed: true