-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
executable file
·84 lines (71 loc) · 2.69 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
version: '{build}'
image: Ubuntu
init:
# Good practice, because Windows line endings are different from Unix/Linux ones
- git config --global core.autocrlf true
install:
- dotnet tool install --global --version 5.8.1 gitversion.tool
before_build:
# Display versions of used tools
- git --version
- dotnet --version
- dotnet-gitversion /version
# Calculate semantic version and set environment variables
- echo *** Calculating semantic version ***
- dotnet-gitversion /verbosity warn /l console /output buildserver /nofetch /b $APPVEYOR_REPO_BRANCH
# Needed to report test results from .NET Core projects to AppVeyor.
- echo *** Installing Appveyor.TestLogger into test projects ***
- find -regex '.*\.Tests?\.csproj' -exec dotnet add {} package --no-restore Appveyor.TestLogger \;
# Patching .NET Core .csproj files (we don't have AssemblyInfo.cs)
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: $(GitVersion_SemVer)
package_version: $(GitVersion_SemVer)
assembly_version: $(GitVersion_AssemblySemVer)
file_version: $(GitVersion_AssemblySemFileVer)
informational_version: $(GitVersion_InformationalVersion)
environment:
# Create separate build jobs for Linux and Windows artifacts
matrix:
- CameraUtility_runtime: linux-x64
- CameraUtility_runtime: win-x64
- CameraUtility_runtime: osx-x64
# Custom environment variables used to publish artifacts. Note that this is executed BEFORE GitVersion
# emits its variables, so it's not possible to use these variables in values here.
CameraUtility_ConsoleAppProject: CameraUtility
CameraUtility_ConsoleAppName: camera-utility
CameraUtility_PublishFolder: publish/$CameraUtility_runtime
# Immediately fail entire build if one of the jobs fails
matrix:
fast_finish: true
configuration: Release
test_script:
- dotnet test
--verbosity m
--configuration $CONFIGURATION
--runtime $CameraUtility_runtime
--logger:AppVeyor
after_test:
- dotnet publish
--verbosity m
--configuration $CONFIGURATION
--runtime $CameraUtility_runtime
--output $CameraUtility_PublishFolder
--self-contained
$CameraUtility_ConsoleAppProject
/p:DebugType=None
- 7z a $CameraUtility_ConsoleAppName-$GitVersion_FullSemVer-$CameraUtility_runtime.zip
$APPVEYOR_BUILD_FOLDER/$CameraUtility_PublishFolder/* $APPVEYOR_BUILD_FOLDER/LICENSE.txt
artifacts:
- path: $(CameraUtility_ConsoleAppName)-$(GitVersion_FullSemVer)-$(CameraUtility_runtime).zip
deploy:
- release: $(GitVersion_FullSemVer)
description: ''
provider: GitHub
auth_token:
secure: /YPgr1Fez43MdWKzvzO10XbOLKPQ6gTeYj0L5QG/ZNb1P7utd529LhWGfTKpQb9p
draft: true
prerelease: false
on:
APPVEYOR_REPO_TAG: true