This repository has been archived by the owner on May 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
appveyor.yml
93 lines (80 loc) · 2.3 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
environment:
PKG_VERSION: 2.0.2
VERSION_SUFFIX: ""
version: ${PKG_VERSION}-{build}
configuration: Release
platform: x64
skip_commits:
message: /travis/
files:
- '**\*.md'
- LICENSE
skip_branch_with_pr: true
matrix:
fast_finish: true
init:
- git config --global core.autocrlf input
- ps: $env:BUILD_VERSION = "$env:PKG_VERSION-$env:APPVEYOR_BUILD_NUMBER"
- ps: |
if ($env:APPVEYOR_REPO_BRANCH -eq "master")
{
$env:VERSION_SUFFIX = ""
$env:NUGET_VERSION = "$env:PKG_VERSION"
}
else
{
$env:VERSION_SUFFIX = "beta$env:APPVEYOR_BUILD_NUMBER"
$env:NUGET_VERSION = "$env:PKG_VERSION-$env:VERSION_SUFFIX"
}
- ps: Update-AppveyorBuild -Version $env:BUILD_VERSION
- ps: Write-Host "Build version $env:BUILD_VERSION, NuGet version $env:NUGET_VERSION, Version suffix $env:VERSION_SUFFIX"
install:
- git submodule update --init --recursive
build_script:
- ps: |
if ($env:APPVEYOR_REPO_BRANCH -eq "master")
{
dotnet build -c $env:CONFIGURATION
}
else
{
dotnet build -c $env:CONFIGURATION --version-suffix $env:VERSION_SUFFIX
}
test: off
test_script:
- dotnet test -c %CONFIGURATION% -f netcoreapp2.2 /p:CollectCoverage=true %APPVEYOR_BUILD_FOLDER%\test\Multiformats.Base.Tests
on_success:
- choco install codecov
- codecov -f "%APPVEYOR_BUILD_FOLDER%\test\Multiformats.Base.Tests\coverage.opencover.xml"
artifacts:
- path: '**\*.nupkg'
name: nupkg
- path: '**\*.snupkg'
name: snupkg
cache:
- '%USERPROFILE%\.local'
- '%USERPROFILE%\.nuget\packages -> **\*.csproj'
- '%LocalAppData%\NuGet\Cache'
- '%LocalAppData%\Python'
- '.\packages -> **\project.json'
- '.\tools'
- '\Python34'
nuget:
account_feed: true
deploy:
- provider: NuGet
api_key:
secure: WcDqU36pLPvA+s5D4N0VEsi7AZGewvf4croE/D3rh3F+iqiztq9w5gHbrhgoTNS9
on:
branch: master
appveyor_repo_tag: true
- provider: GitHub
description: 'Release description'
auth_token:
secure: nsZHZ5nFBFP4fZoVUEeWeZKx7LUASVqCZ+JblTox+02RfTAOlANdFWeCqOwhu7pk
artifact: /.*\.nupkg/ # upload all NuGet packages to release assets
draft: false
prerelease: false
on:
branch: master # release from master branch only
appveyor_repo_tag: true