configuration: Release

before_build:
  - nuget restore

test:
  assemblies:
    - '**\bin\$(configuration)\*.test.dll'

artifacts:
  - path: src\PowerShell\bin\$(configuration)
    name: msi # confusing name of zip default extraction directory
    type: zip

  - path: src\PowerShell\bin\$(configuration)\*.nupkg
    name: package

  - path: src\Setup\bin\$(configuration)\**\*.msi
    name: installer

deploy:
  - provider: GitHub
    description: 'Release of version $(appveyor_build_vesion)'
    auth_token:
      secure: 5K94QY8dHKlbjvlBpQaXwAkmDf+LQE3g5WlU9snnNMjDjf0UT4xDoOBCLWcmwZOm
    artifact: installer, package
    prerelease: true
    on:
      branch: master

  - provider: NuGet
    server: https://powershellgallery.com
    api_key:
      secure: 4STrzCp6wDsDBj/wCtmImMVL7wUI8DCGjdMBXGqQf9JZJ8LjmW5YSY8wtcHAv0XW
    artifact: package
    prerelease: true
    on:
      branch: master

configuration: Release
pull_requests:
  do_not_increment_build_number: true
skip_tags: true

before_build:
  - nuget restore

test:
  assemblies:
    - '**\bin\$(configuration)\*.test.dll'

artifacts:
  - path: src\PowerShell\bin\$(configuration)
    name: msi # confusing name of zip default extraction directory
    type: zip

  - path: src\PowerShell\bin\$(configuration)\*.nupkg
    name: package

  - path: src\Setup\bin\$(configuration)\**\*.msi
    name: installer

deploy:
  - provider: GitHub
    description: 'Release of version $(appveyor_build_version)'
    auth_token:
      secure: 5K94QY8dHKlbjvlBpQaXwAkmDf+LQE3g5WlU9snnNMjDjf0UT4xDoOBCLWcmwZOm
    artifact: installer, package
    prerelease: true
    on:
      branch: master

  - provider: NuGet
    server: https://powershellgallery.com
    api_key:
      secure: 4STrzCp6wDsDBj/wCtmImMVL7wUI8DCGjdMBXGqQf9JZJ8LjmW5YSY8wtcHAv0XW
    artifact: package
    prerelease: true
    on:
      branch: master

Stop building after new tags are pushed
Stop building after new tags are pushed

Every push of 'master' kicked off a second build when a tag was created to
push the release.
