Skip to content
This repository was archived by the owner on Apr 7, 2023. It is now read-only.

Commit 6e9da6a

Browse files
committed
adding the very first version of AppVeyor CI support
1 parent 670d172 commit 6e9da6a

File tree

2 files changed

+135
-0
lines changed

2 files changed

+135
-0
lines changed

OpenMcdf.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
77
ProjectSection(SolutionItems) = preProject
88
.gitattributes = .gitattributes
99
.gitignore = .gitignore
10+
appveyor.yml = appveyor.yml
1011
LICENSE.md = LICENSE.md
1112
README.md = README.md
1213
EndProjectSection

appveyor.yml

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
# Operating system (build VM template)
2+
os: Windows Server 2016
3+
4+
# If the build configuration does not specify build worker image
5+
# then Visual Studio 2015 image is used.
6+
image: Visual Studio 2017
7+
8+
# Restrict to Git branches below
9+
branches:
10+
only:
11+
- master
12+
13+
# Scripts that run after cloning repository
14+
install:
15+
- nuget restore
16+
17+
# Cache files until appveyor.yml is modified.
18+
cache:
19+
- packages -> **\packages.config # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified
20+
- '%LocalAppData%\NuGet\Cache' # NuGet < v3
21+
- '%LocalAppData%\NuGet\v3-cache' # NuGet v3
22+
23+
# Version format
24+
version: 2.1.1.{build}
25+
26+
environment:
27+
VERSION_SIMPLE: '{version}'
28+
VERSION_INFORMATIONAL: '{version}'
29+
VERSION_SUFFIX: '-preview-$(APPVEYOR_BUILD_NUMBER)'
30+
VERSION_SUFFIX_TAG: '-$(APPVEYOR_BUILD_NUMBER)'
31+
32+
init:
33+
- ps: |
34+
$env:VERSION_SIMPLE = $env:APPVEYOR_BUILD_VERSION
35+
$env:VERSION_INFORMATIONAL = $env:APPVEYOR_BUILD_VERSION.TrimEnd(".$env:APPVEYOR_BUILD_NUMBER")
36+
37+
if ($env:APPVEYOR_REPO_TAG -eq "true" -and $env:APPVEYOR_REPO_TAG_NAME)
38+
{
39+
$env:VERSION_SUFFIX = $env:VERSION_SUFFIX_TAG
40+
$tag_version = $env:APPVEYOR_REPO_TAG_NAME.TrimStart("v")
41+
Write-Host "Building a tag: $tag_version";
42+
43+
if ($tag_version -match '([0-9]+[\.-][0-9]+[\.-][0-9]+([-A-Za-z0-9]+)?)')
44+
{
45+
$env:VERSION_INFORMATIONAL = $tag_version
46+
}
47+
if ($tag_version -match '^([0-9]+\.[0-9]+\.[0-9]+)$')
48+
{
49+
$env:VERSION_INFORMATIONAL = "$tag_version$env:VERSION_SUFFIX"
50+
}
51+
}
52+
else
53+
{
54+
$env:VERSION_INFORMATIONAL = "$env:VERSION_INFORMATIONAL$env:VERSION_SUFFIX"
55+
}
56+
57+
Update-AppveyorBuild -Version $env:VERSION_INFORMATIONAL
58+
Write-Host "Using build version: $env:APPVEYOR_BUILD_VERSION";
59+
60+
dotnet_csproj:
61+
patch: true
62+
file: '**\*.csproj'
63+
assembly_version: $(VERSION_SIMPLE)
64+
file_version: $(VERSION_SIMPLE)
65+
version: $(VERSION_INFORMATIONAL)
66+
package_version: $(VERSION_INFORMATIONAL)
67+
informational_version: $(VERSION_INFORMATIONAL)
68+
69+
assembly_info:
70+
patch: true
71+
file: '**\AssemblyInfo.*'
72+
assembly_version: $(VERSION_SIMPLE)
73+
assembly_file_version: $(VERSION_SIMPLE)
74+
assembly_informational_version: $(VERSION_INFORMATIONAL)
75+
76+
# Run scripts below before
77+
before_build:
78+
- where msbuild
79+
- cmd: msbuild /t:Clean
80+
81+
# To run your custom scripts instead of automatic MSBuild
82+
build_script:
83+
- cmd: msbuild /t:Rebuild /p:Configuration=Debug
84+
85+
# NuGet files qualified as artifacts
86+
artifacts:
87+
- path: 'bin\**\*.nupkg' # find the NuGet files
88+
name: OpenMCDF
89+
90+
# Deploy to GitHub releases
91+
deploy:
92+
-
93+
provider: GitHub
94+
auth_token:
95+
secure: 2+d0KgCbWQpUR8TZfzvUEzbi4NQP6F/Tt0PUwLn6jXZCyO8FnrFVFJPsFa0QBQFl
96+
artifact: OpenMCDF
97+
description: |-
98+
Supports the following .NET frameworks and standards
99+
* .NET 4.0
100+
* [.NET 4.6.1](https://github.com/Microsoft/dotnet/blob/master/releases/net461/README.md)
101+
* [.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)
102+
* [.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)
103+
draft: false
104+
force_update: true
105+
prerelease: false
106+
release: "OpenMCDF v$(APPVEYOR_REPO_TAG_NAME)"
107+
tag: $(APPVEYOR_REPO_TAG_NAME)
108+
on:
109+
appveyor_repo_tag: true
110+
111+
-
112+
provider: NuGet
113+
api_key:
114+
secure: TrtChQUTQ9rD8pffK1A9bjMYyN/8eQUjV+7IKVjS/C37TgXMae46Bzd527bZUVSb
115+
artifact: OpenMCDF
116+
server: # remove to push to NuGet.org
117+
skip_symbols: false
118+
symbol_server: # remove to push symbols to SymbolSource.org
119+
on:
120+
appveyor_repo_tag: true
121+
122+
-
123+
provider: NuGet
124+
server: https://ci.appveyor.com/nuget/salaros/api/v2/package
125+
symbol_server: https://ci.appveyor.com/nuget/salaros/api/v2/package
126+
api_key:
127+
secure: 3zmnmVBweTgdk4SBM/rWHdC9JOM9s0pxm1bw1d+WHDo=
128+
artifact: OpenMCDF
129+
130+
# Start builds on tags only (GitHub and BitBucket)
131+
skip_non_tags: false
132+
133+
# Turn off tests
134+
test: off

0 commit comments

Comments
 (0)