version: 2.1.18.{build}

pull_requests:

  do_not_increment_build_number: true

branches:
  only:
  - master

image: Visual Studio 2017
configuration: Release

init:
- -cmd: git config --global core.autocrlf true

dotnet_csproj:
  patch: true
  file: '**\*.csproj'
  version: '{version}'
  package_version: '{version}'
  assembly_version: '{version}'
  file_version: '{version}'
  informational_version: '{version}'

before_build:
- cmd: choco install codecov
- cmd: dotnet restore

build:
  publish_nuget: true
  publish_nuget_symbols: true
  verbosity: minimal

test_script:
- cmd: dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover ./test/ArgSentry.Test/ArgSentry.Test.csproj --logger AppVeyor
- cmd: codecov -f "./test/ArgSentry.Test/coverage.opencover.xml"

artifacts:
- path: '**\*.nupkg'

deploy:
- provider: NuGet
  api_key:
    secure: 92tF47KjBR7PvZKHSvOyde7y5i17Ciwai1+X4gVtNKqGEK1ZrVl8EHQkatu/BjcH
  skip_symbols: false
  artifact: /.*\.nupkg/
  on:
    branch: master
version: 2.1.{build}

pull_requests:

  do_not_increment_build_number: true

branches:
  only:
  - master

image: Visual Studio 2017
configuration: Release

init:
- cmd: git config --global core.autocrlf true

install:
- cmd: choco install codecov

dotnet_csproj:
  patch: true
  file: '**\*.csproj'
  version: '{version}'
  package_version: '{version}'
  assembly_version: '{version}'
  file_version: '{version}'
  informational_version: '{version}'

before_build:
- cmd: dotnet restore

build_script:
- cmd: dotnet build ./src/ArgSentry/ArgSentry.csproj --configuration Release --no-restore

test_script:
- cmd: dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover ./test/ArgSentry.Test/ArgSentry.Test.csproj --logger AppVeyor
- cmd: codecov -f "./test/ArgSentry.Test/coverage.opencover.xml"

after_test:
- cmd: dotnet pack ./src/ArgSentry/ArgSentry.csproj --configuration Release --no-build --no-restore --output ./dist

artifacts:
- path: './dist/*.nupkg'

deploy:
- provider: NuGet
  api_key:
    secure: 92tF47KjBR7PvZKHSvOyde7y5i17Ciwai1+X4gVtNKqGEK1ZrVl8EHQkatu/BjcH
  skip_symbols: true
  artifact: /.*\.nupkg/
  on:
    branch: master
Build & deploy process cleanup
Build & deploy process cleanup
