forked from stratisproject/BlockExplorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
71 lines (55 loc) · 1.79 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
# reference: https://www.appveyor.com/docs/appveyor-yml/
# you can use {branch} name in version format too
# version: 1.0.{build}-{branch}
version: 0.0.9.{build}
pull_requests:
do_not_increment_build_number: true
skip_tags: true
# branches to build
branches:
# whitelist
only:
- master
#---------------------------------#
# environment configuration #
#---------------------------------#
image: Visual Studio 2017
clone_folder: c:\projects\blockexplorer
configuration:
- Debug
- Release
# build cache to preserve files/folders between builds
cache:
- '%USERPROFILE%\.nuget\packages'
init:
- ps: dotnet --info
#---------------------------------#
# build configuration #
#---------------------------------#
build_script:
- ps: |
cd QBitNinja
Write-Host "[$env:configuration] STARTED dotnet build" -foregroundcolor "magenta"
dotnet build -c $env:configuration -v m
Write-Host "[$env:configuration] FINISHED dotnet build" -foregroundcolor "magenta"
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
# scripts to run after build
after_build:
- ps: |
if($env:configuration -eq 'Release')
{
Write-Host "[$env:configuration] TODO: Release Deployments" -foregroundcolor "magenta"
}
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
test_script:
- ps: |
Write-Host "[$env:configuration] TODO: Run Tests" -foregroundcolor "magenta"
Write-Host "[$env:configuration] FINISHED dotnet test" -foregroundcolor "magenta"
if ($anyFailures -eq $TRUE) { $host.SetShouldExit(1) }
#---------------------------------#
# artifacts configuration #
#---------------------------------#
# pushing all files in build directory recursively
artifacts:
- path: nuget\*.nupkg
name: nuget packages