version: '1.0-git-{build}'
skip_tags: true
image: 'Visual Studio 2015'
clone_depth: 1

# Build configuration
configuration:
  - Release

# Branches to build
branches:
  only:
    - master
    - /v\d.*/

# Environment
environment:
  PYTHON: 'C:\Python36-x64'
  NINJA_URL: https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip
  QTDIR: 'C:\Qt\5.9.2\msvc2015_64'
  QT32PATH: 'C:\Qt\5.9.2\msvc2015'
  QT64PATH: 'C:\Qt\5.9.2\msvc2015_64'
  VSVARSALLPATH: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat'
  matrix:
    - BITS: 32
    - BITS: 64

before_build:
  - cmd: prepare_r2.bat

# Build config
build_script:
  - cmd: build.bat %BITS%

# Tests
test: off

# Artifacts
artifacts:
  - path: build%BITS%\cutter%BITS%
    name: Cutter%BITS%

deploy:
  release: cutter-$(appveyor_build_version)
  description: 'Cutter binaries (Windows)'
  provider: GitHub
  auth_token:
    secure: 2SmsqS2RaX2N5c9UwUcfBwNmMX64FfPAZFShLyxIkZXiC8vLaYCHToWxBYEuWRSk
  artifact: Cutter%BITS%
  draft: true
  prerelease: false
  on:
    appveyor_repo_tag: true