forked from angularsen/UnitsNet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
62 lines (50 loc) · 1.7 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
version: '{build}'
image: Visual Studio 2017
skip_commits:
files:
- docs/*
- '**/*.md'
# Only fetch the latest commits to reduce time to download on agent, but support pushes containing multiple commits
clone_depth: 50
# build cache to preserve files/folders between builds
cache:
- packages -> **\packages.config # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified
- '%LocalAppData%\NuGet\Cache' # NuGet < v3
- '%LocalAppData%\NuGet\v3-cache' # NuGet v3
build_script:
- ps: |
#####################################
# Build, test, pack and push nugets
#####################################
.\\build.bat
$BuildExitCode = $LASTEXITCODE
#####################################
# Upload test results to AppVeyor
#####################################
$wc = New-Object 'System.Net.WebClient'
if (Test-Path .\\Artifacts\\Logs\\) {
Get-ChildItem .\\Artifacts\\Logs\\*Test*.xml | %{
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", $_.FullName)
}
}
if ($BuildExitCode -ne 0) {
Write-Host "Build failed with exit code $BuildExitCode."
exit $BuildExitCode
}
# Do not build feature branch with open Pull Requests
skip_branch_with_pr: true
test: off
artifacts:
- path: Artifacts\UnitsNet.zip
- path: 'Artifacts\NuGet\*.nupkg' # find all NuGet packages recursively
deploy:
- provider: NuGet
api_key:
secure: NlJ+D6kXfgU6RgRuf9okylLDENp8DA3tTRSC6UHBNbRS9ZAvRrC3Z0++Mr5VtGvz
on:
branch: master
- provider: NuGet
api_key:
secure: NlJ+D6kXfgU6RgRuf9okylLDENp8DA3tTRSC6UHBNbRS9ZAvRrC3Z0++Mr5VtGvz
on:
branch: release/*