-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
59 lines (56 loc) · 1.99 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
version: 0.2.{build}
image: Visual Studio 2022
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '{version}-beta'
version_prefix: '{version}'
package_version: '{version}-beta'
assembly_version: '{version}'
file_version: '{version}'
informational_version: '{version}'
environment:
CODECOV_TOKEN: 5dcafaa2-bd1c-4757-9175-e4a0bfbe33c0
access_token:
secure: YwffwDvba/ADlMJbtnOM7cKUqudcbYCt2K74HOtBvscwylmIMSRmrX2VKc+fuNjN
skip_commits:
message: /\[deploy ci\]/
before_build:
- ps: dotnet restore
- ps: (Get-Content -path DotNet.Helpers\index.md) -replace '(\d+.)(\d+.)(\d+)',$env:APPVEYOR_BUILD_VERSION | Out-File DotNet.Helpers\index.md
build:
publish_nuget: true
verbosity: minimal
after_test:
- ps: >-
$ErrorActionPreference = "Stop"
dotnet test "DotNet.Helpers.Tests\DotNet.Helpers.Tests.csproj" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Threshold=100 /p:ThresholdType=line --configuration Debug --no-build
if($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode ) }
- ps: choco install codecov --no-progress
- ps: codecov.exe -f "DotNet.Helpers.Tests\coverage.net48.opencover.xml" -t $env:CODECOV_TOKEN
artifacts:
- path: '*.nupkg'
name: nupkg
deploy:
- provider: NuGet
api_key:
secure: icHuJrxBkFdF/VVPbKRG2BkKM93dp43CInNkb7iv0hYe9+d3yXNL9tVqxnxbPUgE
skip_symbols: true
on:
APPVEYOR_REPO_TAG: true
#---------------------------------#
# Deploy to docs #
#---------------------------------#
on_success:
- git config --global credential.helper store
- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n"
- git config --global user.email "joymon@gmail.com"
- git config --global user.name "joymon"
- git checkout master
- ps: Remove-Item docs -recurse -Force -ErrorAction Ignore
- ps: New-Item -ItemType Directory -Force docs
- ps: Copy-Item DotNet.Helpers\_site\* docs -recurse
- git add docs
- git commit -m "[deploy ci]" -- docs
- git status
- git push origin master