version: 4.6.{build}
skip_tags: true
os: Visual Studio 2015
shallow_clone: true
environment:
  COVERALLS_REPO_TOKEN:
    secure: BBBH4QgZXCnE6nFrux34cLWWO5GXrnMU9OZJGJdNePovxJZFzBcm3FsaESNA6zWj
  COVERITY_TOKEN:
    secure: rw3Pk+YPWTG7xG7AaJx8wpxnYAOXM1/7HTRahQGuCHc=
  COVERITY_EMAIL:
    secure: lgy4M/uQ9jMlxmPzTIYWVE2GggvPntq6kfpO6Z0pjAs=
cache:
- build/Version/opencover.snk
- build/Version/opencover.public.snk
nuget:
  disable_publish_on_pr: true
build_script:
- ps: >-
    if ($env:APPVEYOR_SCHEDULED_BUILD -eq "True" -or $env:APPVEYOR_REPO_BRANCH -eq "coverity") {
      & .\build.bat create-coverity-release
    } else {
      & .\build.bat create-release
    }
test: off
artifacts:
- path: main/bin/installer/*.msi
  name: Installer
- path: main/bin/nugetpackage/*.nupkg
  name: Nuget
- path: main/bin/zip/*.zip
  name: ZipArchive
- path: main/bin/nugetpackage-rc/*.nupkg
  name: NugetCandidate
deploy:
- provider: NuGet
  api_key:
    secure: yew/4xjmqdUs1U//LNGQjjMgB3JVantsz09C2LxmKaLXuG1gEsWJl+Nd+VRmB3TM
  skip_symbols: true
  artifact: Nuget
  on:
    branch: release
- provider: NuGet
  api_key:
    secure: yew/4xjmqdUs1U//LNGQjjMgB3JVantsz09C2LxmKaLXuG1gEsWJl+Nd+VRmB3TM
  skip_symbols: true
  artifact: NugetCandidate
  on:
    branch: rc
- provider: GitHub
  tag: $(appveyor_build_version)-rc
  release: OpenCover (Release Candidiate) $(appveyor_build_version)
  auth_token:
    secure: bMPwiJusZ78qab84M/zNAxmpMSCW11eaJI3czwnDzl8tK/9u3y4w38+2WOVkNeOg
  artifact: Installer, ZipArchive
  prerelease: true
  on:
    branch: rc
- provider: GitHub
  tag: $(appveyor_build_version)
  release: OpenCover (Release) $(appveyor_build_version)
  auth_token:
    secure: bMPwiJusZ78qab84M/zNAxmpMSCW11eaJI3czwnDzl8tK/9u3y4w38+2WOVkNeOg
  artifact: Installer, ZipArchive
  on:
    branch: release
notifications:
- provider: Webhook
  url: https://webhooks.gitter.im/e/700bdb95a55f23095db9
  on_build_success: true
  on_build_failure: true
  on_build_status_changed: true
on_success:
- ps: >-
    if ($env:APPVEYOR_SCHEDULED_BUILD -ne "True" -and $env:APPVEYOR_REPO_BRANCH -ne "coverity") {
      & .\build.bat dogfood-release
    }