version: build-{build}
clone_folder: c:\projects\janet
image:
- Visual Studio 2017
configuration:
- Release
- Debug
platform:
- x64
environment:
  matrix:
  - arch: Win64
matrix:
  fast_finish: true

# skip unsupported combinations
init:
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"

install:
    - build_win
    - build_win test
    - choco install nsis -y -pre
    - call "C:\Program Files (x86)\NSIS\makensis.exe" janet-installer.nsi 
    - build_win dist
    - copy janet-install.exe dist\install.exe 
    
build: off

only_commits:
  files:
    - appveyor.yml
    - src/

artifacts:
    - path: dist
      name: janet-windows
      type: Zip

deploy:
  description: 'The Janet Programming Language.'
  provider: GitHub
  auth_token:
    secure: lwEXy09qhj2jSH9s1C/KvCkAUqJSma8phFR+0kbsfUc3rVxpNK5uD3z9Md0SjYRx
  artifact: janet-windows
  draft: true
  on:
      APPVEYOR_REPO_TAG: true