-
Notifications
You must be signed in to change notification settings - Fork 58
/
appveyor.yml
89 lines (73 loc) · 2.9 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
# gitversion will change the version number
version: x-{build}
for:
-
branches:
only:
- master
environment:
snk_secret:
secure: 5QzEIgiDqTIrZruPaIQIvTlNMl5BZ7TGEps7ALyBfHE=
git_token:
secure: NeX5NCOUXsCLc1UjTJjqB9F02FZ8Wq0VsxqTXC8kBdyK6zjxjebrf/9Da2sY1Kql
configuration: Release
os: Visual Studio 2019
init:
- git config --global core.autocrlf input
- git config --global credential.helper store
- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:git_token):[email protected]`n"
- git config --global user.email "[email protected]"
- git config --global user.name "Appveyor CI"
environment:
COVERALLS_REPO_TOKEN:
secure: j4sELCwhVRRjNXFVhjPZjdG4y2itz8jrExhlyDU/lTiLlRQ/P4brB69MGQRFBQae
DOTNET_CLI_TELEMETRY_OPTOUT: 1
# tools we need for bulding/testing/deploying
install:
# see https://help.appveyor.com/discussions/problems/24758-gitversion-5-not-working-on-visual-studio-2019-build
- choco install gitversion.portable -y --version 4.0.0
- npm install [email protected] -g
# No longer signing the assembly
#- nuget install secure-file -ExcludeVersion
#- if defined snk_secret secure-file\tools\secure-file -decrypt src\ipfs.ci.snk.enc -secret %snk_secret% -out src\ipfs.dev.snk
pull_requests:
do_not_increment_build_number: true
nuget:
disable_publish_on_pr: true
before_build:
# - ps: gitversion /output buildserver /updateAssemblyInfo >gitversion.log
- gitversion /output buildserver /updateAssemblyInfo >gitversion
- echo %GitVersion_MajorMinorPatch%
- echo %GitVersion_NuGetVersion%
build_script:
- dotnet build -c %CONFIGURATION% -p:Version=%GitVersion_MajorMinorPatch% -p:AssemblyVersion=%GitVersion_MajorMinorPatch%
after_build:
# Build documentation in doc\_site
- cmd: choco install docfx -y
- cmd: builddocs.cmd
- cmd: 7z a -tzip docs.zip doc\_site
- cmd: appveyor PushArtifact docs.zip
- if defined git_token gh-pages -d doc\_site -m "new docs %GitVersion_FullSemVer%"
test_script:
- dotnet test -c %CONFIGURATION% --no-build --no-restore test
after_test:
# Generate coverage report
- dotnet test -c %CONFIGURATION% -f netcoreapp3.0 --no-build --no-restore test /p:CollectCoverage=true /p:Include="[Ipfs.Core]*"
- choco install codecov -y
- codecov -f "test/coverage.opencover.xml"
- dotnet tool install --global coveralls.net --version 1.0.0
- if defined COVERALLS_REPO_TOKEN
csmacnz.coveralls.exe
--opencover -i test/coverage.opencover.xml --useRelativePaths --serviceName appveyor --jobId %APPVEYOR_BUILD_NUMBER%
artifacts:
- path: 'src/**/*.nupkg'
name: nupkg
- path: 'src/**/*.snupkg'
name: snupkg
# publish NuGet package on tag build
deploy:
- provider: NuGet
api_key:
secure: OdmGEj/l0K0ZPDmXAYx+fryCzV012eTrM29ALBuL0waxvwLvrufdDXiI+1iNhWEG
on:
appveyor_repo_tag: true