-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathappveyor.yml
91 lines (70 loc) · 2.45 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
#---------------------------------#
# general configuration #
#---------------------------------#
version: '{build}'
pull_requests:
do_not_increment_build_number: true
branches:
only:
- master
#---------------------------------#
# environment configuration #
#---------------------------------#
image: Visual Studio 2017
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
nuget:
project_feed: true
disable_publish_on_pr: true
#---------------------------------#
# build configuration #
#---------------------------------#
platform: Any CPU
configuration: Release
environment:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
build:
publish_nuget: true
publish_nuget_symbols: true
init:
- ps: |
$revision = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10)
$env:VERSION_SUFFIX = "ci-$revision"
before_build:
- appveyor-retry dotnet restore -v Minimal
build_script:
- dotnet build "src\Dapper.AmbientContext" -c %CONFIGURATION% --no-dependencies --version-suffix %VERSION_SUFFIX%
- dotnet build "test\Dapper.AmbientContext.Tests" -c %CONFIGURATION% --no-dependencies --version-suffix %VERSION_SUFFIX%
after_build:
- ps: |
if ($env:APPVEYOR_REPO_TAG -eq $true)
{
dotnet pack "src\Dapper.AmbientContext" -c $env:CONFIGURATION --no-build --include-symbols -o artifacts
}
else
{
dotnet pack "src\Dapper.AmbientContext" -c $env:CONFIGURATION --no-build --include-symbols -o artifacts --version-suffix $env:VERSION_SUFFIX
}
test_script:
- dotnet test "test\Dapper.AmbientContext.Tests\Dapper.AmbientContext.Tests.csproj" --no-build --no-restore -c %CONFIGURATION% -f net452 -a %USERPROFILE%\.nuget\packages\machine.specifications.runner.visualstudio\2.9.0
- dotnet test "test\Dapper.AmbientContext.Tests\Dapper.AmbientContext.Tests.csproj" --no-build --no-restore -c %CONFIGURATION% -f netcoreapp2.1
#---------------------------------#
# artifacts configuration #
#---------------------------------#
artifacts:
- path: src\Dapper.AmbientContext\artifacts\**\*.*
#---------------------------------#
# deployment configuration #
#---------------------------------#
deploy:
- provider: NuGet
api_key:
secure: ZyNMTHl83Q+jbtyCaweu6ULT7jo2dGq+lF7TibDcVyE1aH9KKvdmf9FEHkRQHVCL
artifact: /.*\.nupkg/
on:
branch: master
appveyor_repo_tag: true