forked from richardschneider/net-ipfs-http-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
93 lines (77 loc) · 3.21 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
92
93
# gitversion will change the version number
version: x-{build}
for:
-
branches:
only:
- master
environment:
git_token:
secure: NeX5NCOUXsCLc1UjTJjqB9F02FZ8Wq0VsxqTXC8kBdyK6zjxjebrf/9Da2sY1Kql
snk_secret:
secure: 5QzEIgiDqTIrZruPaIQIvTlNMl5BZ7TGEps7ALyBfHE=
configuration: Release
os: Visual Studio 2017
init:
- git config --global core.autocrlf input
- git config --global credential.helper store
- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:git_token):x-oauth-basic@github.com`n"
- git config --global user.email "noreply@emanon.org"
- git config --global user.name "Appveyor CI"
environment:
COVERALLS_REPO_TOKEN:
secure: u109t00NLIZQyREMNUyPlMd8gCi6w3o790yT8mQnzEC0LvZyevt+04u63TQfrifC
DOTNET_CLI_TELEMETRY_OPTOUT: 1
# tools we need for bulding/testing/deploying
install:
- dotnet --version
- choco install gitversion.portable -y
- npm install gh-pages -g
# - 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
# - choco install go-ipfs
- choco install go-ipfs --version 0.4.21 --force
- ipfs init
- ps: Start-Process -FilePath "ipfs.exe" -ArgumentList "daemon --enable-pubsub-experiment"
# gitversion will change the assembly info
pull_requests:
do_not_increment_build_number: true
before_build:
- nuget restore
- ps: gitversion /output buildserver /updateAssemblyInfo >gitversion.log
build_script:
- dotnet build -c %CONFIGURATION% -p:Version=%GitVersion_MajorMinorPatch% -p:AssemblyVersion=%GitVersion_MajorMinorPatch%
- dotnet pack -c %CONFIGURATION% --no-build --no-restore -p:Version=%GitVersion_MajorMinorPatch% -p:AssemblyVersion=%GitVersion_MajorMinorPatch%
after_build:
- cmd: appveyor PushArtifact "src\bin\%CONFIGURATION%\Ipfs.Http.Client.%GitVersion_MajorMinorPatch%.nupkg"
# Build documentation in doc\_site
# v2.43 is requiring VS 2019!!!
- cmd: choco install docfx -y --version 2.42 --force
- docfx doc\docfx.json --logLevel Warning --warningsAsErrors
- 7z a -tzip docs.zip doc\_site
- 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
- packages\OpenCover.4.6.519\tools\OpenCover.Console.exe
-register:user -filter:"+[Ipfs.Http*]* -[*Tests]*"
-target:"c:\Program Files\dotnet\dotnet.exe"
-targetargs:"test -c Release --no-build --no-restore --framework netcoreapp2.0 test"
-output:coverage.xml
-mergeoutput
-hideskipped:File
-oldStyle
- if defined COVERALLS_REPO_TOKEN
packages\coveralls.net.0.6.0\tools\csmacnz.coveralls.exe
--opencover -i ./coverage.xml --useRelativePaths --serviceName appveyor --jobId %APPVEYOR_BUILD_NUMBER%
# publish NuGet package on tag build
nuget:
disable_publish_on_pr: true
deploy:
- provider: NuGet
api_key:
secure: OdmGEj/l0K0ZPDmXAYx+fryCzV012eTrM29ALBuL0waxvwLvrufdDXiI+1iNhWEG
on:
appveyor_repo_tag: true