forked from T4MVC/R4MVC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
109 lines (89 loc) · 3.17 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
version: 1.0.0.{build}
image: Visual Studio 2019
configuration: Release
skip_tags: true
init:
- ps: $Env:VersionSuffixParam = "--version-suffix"
- ps: $Env:VersionSuffixValue = ("ci-" + $Env:APPVEYOR_BUILD_NUMBER.PadLeft(5, "0"))
before_build:
- ps: 'Write-Output ("Build version suffix: " + $Env:VersionSuffixValue)'
- ps: dotnet --info
- ps: dotnet restore -v Minimal
build_script:
- ps: dotnet build -c $Env:CONFIGURATION
- ps: .\RunGenerate.bat
- ps: dotnet build -c $Env:CONFIGURATION $Env:VersionSuffixParam $Env:VersionSuffixValue /p:BuildNumber=$Env:APPVEYOR_BUILD_NUMBER
- ps: dotnet build src\R4Mvc.Tools.Cli -c $Env:CONFIGURATION $Env:VersionSuffixParam $Env:VersionSuffixValue /p:BuildNumber=$Env:APPVEYOR_BUILD_NUMBER
- ps: dotnet pack -c $Env:CONFIGURATION $Env:VersionSuffixParam $Env:VersionSuffixValue /p:BuildNumber=$Env:APPVEYOR_BUILD_NUMBER
test_script:
- ps: dotnet test -c $Env:CONFIGURATION
artifacts:
- path: '**\*.nupkg'
- path: '**\*.snupkg'
before_deploy:
- ps: |
foreach ($artifactName in $artifacts.keys) {
$artifact = $artifacts[$artifactName]
if ($artifact.name -like '*tools*') {
$artifactSize = (Get-Item $artifact.path).length
if ($artifactSize -lt 5mb) {
throw [System.Exception] "$artifact.name is too small: $artifactSize"
}
}
}
for:
- branches:
only:
- develop
deploy:
- provider: NuGet
server: https://www.myget.org/F/r4mvc/api/v2/package
symbol_server: https://www.myget.org/F/r4mvc/symbols/api/v2/package
api_key:
secure: DdgwyUm4/aaCfk28jRGRFgQpqcCp6OvuqCZLZaHjNAPHZuia0+PF01zC8JGpWfe7
artifact: /.*\.nupkg/
- branches:
only:
- /feature\/.*/
init:
- ps: $Env:VersionSuffixParam = "--version-suffix"
- ps: $Env:VersionSuffixValue = ("ci--" + $Env:APPVEYOR_REPO_BRANCH.Substring(8) + "-" + $Env:APPVEYOR_BUILD_NUMBER.PadLeft(5, "0"))
deploy:
- provider: NuGet
server: https://www.myget.org/F/r4mvc/api/v2/package
symbol_server: https://www.myget.org/F/r4mvc/symbols/api/v2/package
api_key:
secure: DdgwyUm4/aaCfk28jRGRFgQpqcCp6OvuqCZLZaHjNAPHZuia0+PF01zC8JGpWfe7
artifact: /.*\.nupkg/
- branches:
only:
- /prerelease\/.*/
init:
- ps: $Env:VersionSuffixParam = "--version-suffix"
- ps: $Env:VersionSuffixValue = ($Env:APPVEYOR_REPO_BRANCH.Substring(11) + "-" + $Env:APPVEYOR_BUILD_NUMBER.PadLeft(5, "0"))
deploy:
- provider: NuGet
api_key:
secure: /0fA0RjUbNqcNCVM23B1QvsFpvvGJby39xb+4Huf++CvtoiAmXxLkfvH2mMbkW/D
artifact: /.*\.nupkg/
publish_nuget_symbols: true
use_snupkg_format: true
- branches:
only:
- master
init:
- ps: $Env:VersionSuffixParam = $null
- ps: $Env:VersionSuffixValue = $null
deploy:
- provider: NuGet
api_key:
secure: /0fA0RjUbNqcNCVM23B1QvsFpvvGJby39xb+4Huf++CvtoiAmXxLkfvH2mMbkW/D
artifact: /.*\.nupkg/
publish_nuget_symbols: true
use_snupkg_format: true
- provider: NuGet
server: https://www.myget.org/F/r4mvc/api/v2/package
symbol_server: https://www.myget.org/F/r4mvc/symbols/api/v2/package
api_key:
secure: DdgwyUm4/aaCfk28jRGRFgQpqcCp6OvuqCZLZaHjNAPHZuia0+PF01zC8JGpWfe7
artifact: /.*\.nupkg/