-
-
Notifications
You must be signed in to change notification settings - Fork 97
/
Copy pathappveyor.yml
66 lines (55 loc) · 2.01 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
skip_non_tags: false
#test: off
image: Visual Studio 2019
configuration: Release
# Only build when [release] is in the commit title
#only_commits:
# message: /\[release\]/
skip_commits:
files:
- Examples/**/*
- '**/*.md'
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '{version}'
package_version: '{version}'
assembly_version: '{version}'
file_version: '{version}'
informational_version: '{version}'
init:
- set PATH=C:\Program Files\Java\jdk15\bin;%PATH%
- set JAVA_HOME_11_X64=C:\Program Files\Java\jdk15
- set JAVA_HOME=C:\Program Files\Java\jdk15
install:
- ps: Switch-DockerLinux
- ps: dotnet tool install -g GitVersion.Tool
- ps: dotnet tool install -g dotnet-format
- ps: dotnet tool install -g dotnet-sonarscanner -v:m
before_build:
- nuget restore
# - ps: dotnet format --check --dry-run
- ps: dotnet gitversion /l console /output buildserver
- ps: dotnet sonarscanner begin /d:sonar.host.url=https://sonarcloud.io /d:sonar.login=e220dd372506f00fe34923f011ea45f8568e9bcc /k:mariotoffia_FluentDocker /o:mariotoffia /v:"$env:APPVEYOR_BUILD_NUMBER" /d:sonar.cs.opencover.reportsPaths="./output/coverage.opencover.xml" /d:sonar.coverage.exclusions="**Tests*.cs"
- ps: $env:good_to_deploy="true"
- ps: if (Test-Path env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH) {echo "Not going to deploy because pull request."}
- ps: if (Test-Path env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH) {$env:good_to_deploy="false"}
- echo good_to_deploy=%good_to_deploy%
build:
project: FluentDocker.sln
publish_nuget: true
verbosity: minimal
test_script:
- ps: dotnet test --settings coverletArgs.runsettings --filter TestCategory=CI -f netcoreapp3.1
after_test:
- ps: dotnet sonarscanner end /d:sonar.login=e220dd372506f00fe34923f011ea45f8568e9bcc
artifacts:
- path: '.\**\Release\*.nupkg'
name: NuGet Packages
deploy:
- provider: NuGet
on:
branch: master
good_to_deploy: true
api_key:
secure: JltY4YIjjAWA5cjaWbc9b2LWTE41Wthz886xZt3zCXz3PZWF/JQ286freKBTNqnM