# AppVeyor configuration

version: "{build}"

assembly_info:
  patch: false

cache:
  - packages -> **\packages.config

before_build:
  - gitversion /output buildserver /updateAssemblyInfo FakeSystemWeb\Properties\AssemblyInfo.cs
  - nuget restore

build:
  publish_nuget: false
  verbosity: minimal

after_build:
  - 7z a "FakeSystemWeb_%GitVersion_NuGetVersion%.zip" ".\FakeSystemWeb\bin\%CONFIGURATION%\*"
  - nuget pack FakeSystemWeb\FakeSystemWeb.csproj -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%"

artifacts:
  - path: FakeSystemWeb.$(GitVersion_NuGetVersion).nupkg
  - path: FakeSystemWeb_$(GitVersion_NuGetVersion).zip

nuget:
  account_feed: true
  project_feed: true
  disable_publish_on_pr: true

deploy:
  - provider: NuGet
    api_key:
      secure: BIYmTD2m0YuxsKt7KwAOyQ==
    skip_symbols: true
    on:
      APPVEYOR_REPO_TAG: true

# AppVeyor configuration

version: "{build}"

assembly_info:
  patch: false

cache:
  - packages -> **\packages.config

before_build:
  - gitversion /output buildserver /updateAssemblyInfo FakeSystemWeb\Properties\AssemblyInfo.cs
  - 7a a "FakeSystemWeb_%GitVersion_NuGetVersion%_src.zip" ".\*" -x!.git -x!packages
  - ps: $env:Build_IsPreRelease=(-not [String]::IsNullOrEmpty($env:GitVersion_PreReleaseTag)).ToString().ToLower()
  - nuget restore

build:
  publish_nuget: false
  verbosity: minimal

after_build:
  - 7z a "FakeSystemWeb_%GitVersion_NuGetVersion%.zip" ".\FakeSystemWeb\bin\%CONFIGURATION%\*"
  - nuget pack FakeSystemWeb\FakeSystemWeb.csproj -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%"

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

nuget:
  account_feed: true
  project_feed: true
  disable_publish_on_pr: true

deploy:
  - provider: NuGet
    api_key:
      secure: BIYmTD2m0YuxsKt7KwAOyQ==
    skip_symbols: true
    on:
      APPVEYOR_REPO_TAG: true

  - provider: GitHub
    auth_token:
      secure: BIYmTD2m0YuxsKt7KwAOyQ==
    tag: '$(APPVEYOR_REPO_TAG_NAME)'
    release: '$(GitVersion_NuGetVersion)'
    description: ''
    artifact: /.*\.zip/
    prerelease: '$(Build_IsPreRelease)'
    on:
      APPVEYOR_REPO_TAG: true

Add source zip and GitHub release
Add source zip and GitHub release
