-
Notifications
You must be signed in to change notification settings - Fork 13
/
appveyor.yml
124 lines (97 loc) · 3.97 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# 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.
#---------------------------------#
# general configuration #
#---------------------------------#
# Retain the NuGet package cache between builds
cache:
- packages -> **\packages.config
# version format
version: 0.0.{build}
#---------------------------------#
# environment configuration #
#---------------------------------#
# Operating system (build VM template)
os: Visual Studio 2015
environment:
COVERALLS_REPO_TOKEN:
secure: jlhfF+rdDZcjWN/u57Q6xPQZbZCL9fMkqWaAfbyLp/C+H5gQ7PHLxFIIDX+7H4eV
# scripts that are called at very beginning, before repo cloning
init:
- git config --global core.autocrlf input
# http://blog.appveyor.com/2014/06/04/shallow-clone-for-git-repositories/
#shallow_clone: true
# scripts that run after cloning repository
install:
- choco install gitversion.portable -y
assembly_info:
patch: false
#---------------------------------#
# build configuration #
#---------------------------------#
# build Configuration, i.e. Debug, Release, etc.
configuration: Release
build:
project: cloudflare.net.sln
#publish_nuget: true # package projects with .nuspec files and push to artifacts
#publish_nuget_symbols: true # generate and publish NuGet symbol packages
# MSBuild verbosity level
verbosity: minimal
before_build:
- appveyor DownloadFile https://raw.githubusercontent.com/appveyor/ci/master/scripts/nuget-restore.cmd
- nuget-restore
- ps: gitversion /l console /output buildserver /updateAssemblyInfo
after_build:
- nuget pack "%APPVEYOR_BUILD_FOLDER%\src\CloudFlare.NET\CloudFlare.NET.csproj" -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%" -Symbols
- appveyor PushArtifact "CloudFlare.NET.%GitVersion_NuGetVersion%.nupkg"
- appveyor PushArtifact "CloudFlare.NET.%GitVersion_NuGetVersion%.symbols.nupkg"
- nuget pack "%APPVEYOR_BUILD_FOLDER%\src\CloudFlare.NET.Yaml\CloudFlare.NET.Yaml.csproj" -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%" -Symbols
- appveyor PushArtifact "CloudFlare.NET.Yaml.%GitVersion_NuGetVersion%.nupkg"
- appveyor PushArtifact "CloudFlare.NET.Yaml.%GitVersion_NuGetVersion%.symbols.nupkg"
#---------------------------------#
# tests configuration #
#---------------------------------#
test_script: coverage.cmd
after_test: |
FOR /r %%F IN (*coveralls.net.exe) DO SET coveralls_exe=%%F
%coveralls_exe% --opencover src\TestResults\Test.Coverage.xml
appveyor PushArtifact src\TestResults\Specifications.html -FileName "Specifications_%GitVersion_FullSemVer%.html"
#---------------------------------#
# deployment configuration #
#---------------------------------#
deploy:
# Deploy to NuGet when tags are applied to the master branch.
- provider: NuGet
api_key:
secure: YE/e/aOqNtjXWWk+IKzSl+HtDzrSE1tkaUPGQtzg6mA5chWEz53GJ9WNF/qdXgX1
on:
branch: master
appveyor_repo_tag: true
# Deploy to GitHub when tags are applied to the master branch.
- provider: GitHub
auth_token:
secure: HsYB0bln/Vj2trBco3Z3y9tG8sN8kguyXMogs9wSV65e0qRLl+BABxBxt3Q+CX9y
on:
branch: master
appveyor_repo_tag: true
#---------------------------------#
# global handlers #
#---------------------------------#
# after build failure or success
on_finish: |
7z a CoverageResults.7z src\TestResults\
appveyor PushArtifact CoverageResults.7z -FileName "CoverageResults_%GitVersion_FullSemVer%.7z"
#---------------------------------#
# notifications #
#---------------------------------#
notifications:
# Slack
- provider: Slack
auth_token:
secure: AkSNuuHmfzAFp2+Oq00NRQFOfrXl4ue08SHx0FC2WTeXSiZv8uVKI3ZBWns7HTcV
channel: cloudflare_net
on_build_success: false
on_build_status_changed: true