forked from angularsen/UnitsNet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
44 lines (39 loc) · 1.45 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
version: '{build}'
image: Visual Studio 2017
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
}
test: off
artifacts:
- path: Artifacts\UnitsNet.zip
- path: 'Artifacts\NuGet\*.nupkg' # find all NuGet packages recursively
environment:
api_key:
secure: Onn5DCtRxwNADYG8i4snNuUOE5qhUsUSv5unaY5SMLv4l2FbRnIUlbdVw02s39Xk
deploy:
- provider: NuGet
api_key:
secure: Onn5DCtRxwNADYG8i4snNuUOE5qhUsUSv5unaY5SMLv4l2FbRnIUlbdVw02s39Xk
skip_symbols: false
on:
branch: master
deploy_script:
- appveyor DownloadFile https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
- ps: ($artifacts.values | Where-Object {($_.path -like '*.nupkg') -and !($_.path -like '*.symbols.nupkg')}) | foreach-object {nuget.exe push $_.path -Source https://www.nuget.org/api/v2/package -ApiKey $env:api_key}