This repository has been archived by the owner on Apr 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
appveyor.yml
136 lines (116 loc) · 4.34 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
125
126
127
128
129
130
131
132
133
134
135
136
# Operating system (build VM template)
os: Windows Server 2016
# If the build configuration does not specify build worker image
# then Visual Studio 2015 image is used.
image: Visual Studio 2017
# Restrict to Git branches below
branches:
only:
- master
# Scripts that run after cloning repository
install:
- nuget restore
# Cache files until appveyor.yml is modified.
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
# Version format
version: 2.1.1
environment:
VERSION_SIMPLE: '{version}'
VERSION_INFORMATIONAL: '{version}'
VERSION_SUFFIX: '-preview-$(APPVEYOR_BUILD_NUMBER)'
VERSION_SUFFIX_TAG: '.$(APPVEYOR_BUILD_NUMBER)'
init:
- ps: |
$env:VERSION_SIMPLE = $env:APPVEYOR_BUILD_VERSION
$env:VERSION_INFORMATIONAL = $env:APPVEYOR_BUILD_VERSION
Write-Host "Starting with $env:APPVEYOR_BUILD_VERSION as base version and $env:VERSION_INFORMATIONAL as informational version";
if ($env:APPVEYOR_REPO_TAG -eq "true" -and $env:APPVEYOR_REPO_TAG_NAME)
{
$env:VERSION_SUFFIX = $env:VERSION_SUFFIX_TAG
$tag_version = $env:APPVEYOR_REPO_TAG_NAME.TrimStart("v")
Write-Host "Building a tag: $tag_version";
if ($tag_version -match '^([0-9]+\.[0-9]+\.[0-9]+)$' -Or $tag_version -match '([0-9]+[\.-][0-9]+[\.-][0-9]+-[-A-Za-z0-9]+)')
{
$env:VERSION_INFORMATIONAL = "$tag_version"
}
}
else
{
$env:VERSION_INFORMATIONAL = "$env:VERSION_INFORMATIONAL$env:VERSION_SUFFIX"
}
Update-AppveyorBuild -Version $env:VERSION_INFORMATIONAL
Write-Host "Using build version: $env:APPVEYOR_BUILD_VERSION";
configuration: Debug
dotnet_csproj:
patch: true
file: '**\*.csproj'
assembly_version: $(VERSION_SIMPLE)
file_version: $(VERSION_SIMPLE)
version: $(VERSION_INFORMATIONAL)
package_version: $(VERSION_INFORMATIONAL)
informational_version: $(VERSION_INFORMATIONAL)
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: $(VERSION_SIMPLE)
assembly_file_version: $(VERSION_SIMPLE)
assembly_informational_version: $(VERSION_INFORMATIONAL)
# Run scripts below before
before_build:
- where msbuild
- cmd: msbuild /t:Clean
# To run your custom scripts instead of automatic MSBuild
build_script:
- cmd: msbuild /t:Rebuild /p:Configuration=%configuration%
# NuGet files qualified as artifacts
artifacts:
- path: 'bin\**\*.nupkg' # find the NuGet files
name: OpenMCDF
# Deploy to GitHub releases
deploy:
-
provider: GitHub
auth_token:
secure: 2+d0KgCbWQpUR8TZfzvUEzbi4NQP6F/Tt0PUwLn6jXZCyO8FnrFVFJPsFa0QBQFl
artifact: OpenMCDF
description: |-
Supports the following .NET frameworks and standards
* .NET 4.0
* [.NET 4.5.2](https://github.com/Microsoft/dotnet/blob/master/releases/net452/README.md)
* [.NET 4.6.1](https://github.com/Microsoft/dotnet/blob/master/releases/net461/README.md)
* [.NET 4.7](https://github.com/Microsoft/dotnet/blob/master/releases/net47/README.md)
* [.NET Standard 1.6](https://github.com/dotnet/standard/blob/master/docs/versions/netstandard1.6.md) (.NET Core >=1.0, .NET >=4.6.1, Mono >=4.6 etc)
* [.NET Standard 2.0](https://github.com/dotnet/standard/blob/master/docs/versions/netstandard2.0.md) (.NET Core >=2.0, .NET >=4.6.1, Mono >=5.4 etc)
draft: false
force_update: true
prerelease: false
release: "OpenMCDF v$(APPVEYOR_REPO_TAG_NAME)"
tag: $(APPVEYOR_REPO_TAG_NAME)
on:
appveyor_repo_tag: true
-
provider: NuGet
api_key:
secure: i6oWn60J7ZOM4UuYcvxbuk9OAEp6or+Wq7izyJDPNlcLIhG2UKsxz7G/8erhdY3M
artifact: OpenMCDF
server: # remove to push to NuGet.org
skip_symbols: false
symbol_server: # remove to push symbols to SymbolSource.org
on:
appveyor_repo_tag: true
-
provider: NuGet
server: https://ci.appveyor.com/nuget/salaros/api/v2/package
symbol_server: https://ci.appveyor.com/nuget/salaros/api/v2/package
api_key:
secure: 3zmnmVBweTgdk4SBM/rWHdC9JOM9s0pxm1bw1d+WHDo=
artifact: OpenMCDF
# Start builds on tags only (GitHub and BitBucket)
skip_non_tags: false
# Turn off tests
test:
assemblies:
- 'bin\%configuration%\tests\*.dll'