# AppVeyor CI build file

# Notes:
#   - Minimal appveyor.yml file is an empty file. All sections are optional.
#   - Indent each level of configuration with 2 spaces. Do not use tabs!
#   - All section names are case-sensitive.
#   - Section names should be unique on each level.

# version format
version: 3.0.{build}
image: Visual Studio 2017

shallow_clone: true

#---------------------------------#
#       build configuration       #
#---------------------------------#

# build platform, i.e. x86, x64, Any CPU. This setting is optional.
platform: Any CPU

# build Configuration, i.e. Debug, Release, etc.
configuration: Release

# to run your custom scripts instead of automatic MSBuild
build_script:
  - cmd: build.bat Package

assembly_info:
  patch: true
  file: AssemblyInfo.*
  assembly_version: "{version}"
  assembly_file_version: "{version}"
  assembly_informational_version: "{version}"

# to disable automatic tests 
test: on

# skip building commits that add tags (such as release tag)
skip_tags: true

skip_commits:
  author: buildbot121
  
#---------------------------------#
#       artifacts configuration   #
#---------------------------------#

nuget:
  disable_publish_on_pr: true     # disable publishing of .nupkg artifacts to account/project feeds for pull request builds

artifacts:
  - path: '**\Titanium.Web.Proxy.*.nupkg'

environment:
  github_access_token:
    secure: BGdKiI7FwHGkFt+/OmgZDkE1hzLqLrTxcc9c+joVqGyO4LvesHb1sR6hzisVwVPm
  github_email:
    secure: wvYod3JLufbIBkavRXlCP724wJkhqR2RRuLLaPnqfps=
  nuget_access_token:
    secure: ZbRmjOcp+TDllRV1wxqLZjdRV7hld388rXlWVJuGGiQleomP9Ku+Nsy3a75E7/9k
deploy:
- provider: GitHub
  auth_token: $(github_access_token)
  on:
    branch: /(stable|beta)/ 
- provider: NuGet
  api_key: $(nuget_access_token)
  on:
    branch: /(stable|beta)/
