version: 1.3.5-{build}

os: Visual Studio 2017

nuget:
  account_feed: false
  
branches:
  only:
  - master
  - dev

pull_requests:
  do_not_increment_build_number: true

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

before_build:
- cmd: dotnet restore --no-cache

build_script:
- cmd: dotnet build src/Hangfire.Console -c Release
- cmd: dotnet build tests/Hangfire.Console.Tests -c Release

after_build:
- cmd: dotnet pack src/Hangfire.Console -o ../../artifacts -c Release

test_script:
- cmd: dotnet test tests/Hangfire.Console.Tests/Hangfire.Console.Tests.csproj

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

deploy:
- provider: NuGet
  server: https://www.myget.org/F/pieceofsummer/api/v2/package
  api_key:
    secure: zGtPSEbAdSdw+R1A4kL+xAK92xPP3vlA7Jmwo58OVL1H5OcyqhEbK19kcxVJrD3D
  skip_symbols: true

- provider: NuGet
  api_key:
    secure: /B/lHY/wXT6+qusrGn43U/xANEleYKnijqcoZaPx6E+4Igkgo/iytFaOAsd9g98G
  skip_symbols: true
  on:
    branch: master
    appveyor_repo_tag: true

version: 1.3.5-{build}

os: Visual Studio 2017

nuget:
  account_feed: false
  
branches:
  only:
  - master
  - dev

pull_requests:
  do_not_increment_build_number: true

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

before_build:
- cmd: dotnet restore

build_script:
- cmd: dotnet build src/Hangfire.Console -c Release
- cmd: dotnet build tests/Hangfire.Console.Tests -c Release

after_build:
- cmd: dotnet pack src/Hangfire.Console -o ../../artifacts -c Release

test_script:
- cmd: dotnet test tests/Hangfire.Console.Tests/Hangfire.Console.Tests.csproj

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

deploy:
- provider: NuGet
  server: https://www.myget.org/F/pieceofsummer/api/v2/package
  api_key:
    secure: zGtPSEbAdSdw+R1A4kL+xAK92xPP3vlA7Jmwo58OVL1H5OcyqhEbK19kcxVJrD3D
  skip_symbols: true

- provider: NuGet
  api_key:
    secure: /B/lHY/wXT6+qusrGn43U/xANEleYKnijqcoZaPx6E+4Igkgo/iytFaOAsd9g98G
  skip_symbols: true
  on:
    branch: master
    appveyor_repo_tag: true

Use cached package restore to fix issue with Hangfire dependency
Use cached package restore to fix issue with Hangfire dependency
