-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathappveyor.yml
72 lines (57 loc) · 1.8 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
environment:
VERSION_MINOR: 3.0.0
VERSION_BUILD: $(VERSION_MINOR).$(APPVEYOR_BUILD_NUMBER)
version: $(VERSION_MINOR).{build}
pull_requests:
do_not_increment_build_number: true
branches:
only:
- dev
- master
skip_commits:
files:
- '**/.git*'
- '**/*.MD'
image: Visual Studio 2022
configuration: Release
init:
- cmd: git config --global core.autocrlf true
install:
- cmd: choco install codecov --no-progress
dotnet_csproj:
patch: true
file: '**\*.csproj'
assembly_version: '$(VERSION_BUILD)'
file_version: '$(VERSION_BUILD)'
informational_version: '$(VERSION_BUILD)'
before_build:
- cmd: dotnet restore
build_script:
- cmd: dotnet build ./src/ArgSentry/ArgSentry.csproj --configuration Release --no-restore
test_script:
- cmd: dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover ./test/ArgSentry.Test/ArgSentry.Test.csproj --logger AppVeyor
- cmd: codecov -f "./test/ArgSentry.Test/coverage.opencover.xml"
after_test:
- ps: >-
$branch = $env:APPVEYOR_REPO_BRANCH;
if ($branch -eq 'dev') {
$suffix = "beta" + ([int]$env:APPVEYOR_BUILD_NUMBER).ToString("0000");
dotnet pack ./src/ArgSentry/ArgSentry.csproj --configuration Release --no-build --no-restore --output dist /p:VersionPrefix=$env:VERSION_MINOR --version-suffix $suffix
} elseif ($branch -eq 'master') {
dotnet pack ./src/ArgSentry/ArgSentry.csproj --configuration Release --no-build --no-restore --output dist /p:VersionPrefix=$env:VERSION_MINOR
}
artifacts:
- path: '**\*.nupkg'
deploy:
- provider: NuGet
api_key:
secure: NRcCXZyQD08WgXPxj5i4Gmt2UR6Ug4/SH7FTwtVPsfNp76rgthe/HwSRSb1L1XY/
skip_symbols: true
on:
branch: dev
- provider: NuGet
api_key:
secure: NRcCXZyQD08WgXPxj5i4Gmt2UR6Ug4/SH7FTwtVPsfNp76rgthe/HwSRSb1L1XY/
skip_symbols: true
on:
branch: master