forked from SteamRE/SteamKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
90 lines (76 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
90
version: 2.1.0.{build}
os: Visual Studio 2017
cache:
- '%LocalAppData%\NuGet\Cache'
- '%Temp%\nethook2-dependencies -> Resources\NetHook2\SetupDependencies.ps1'
assembly_info:
patch: true
file: AssemblyInfo.cs
assembly_version: "2.1.0"
assembly_file_version: "{version}"
assembly_informational_version: "{version} - CI (AppVeyor, branch: {branch})"
configuration:
- Debug
- Release
init:
- git config --global core.autocrlf true
before_build:
- dotnet restore SteamKit2\SteamKit2.sln
- dotnet restore Samples\Samples.sln
- nuget restore Resources\NetHookAnalyzer2\NetHookAnalyzer2.sln
- Resources\NetHook2\SetupDependencies.cmd
build_script:
- dotnet build SteamKit2\SteamKit2.sln
- dotnet build Samples\Samples.sln
- msbuild Resources\NetHook2\NetHook2.sln
- msbuild Resources\NetHookAnalyzer2\NetHookAnalyzer2.sln
after_build:
- '7z a NetHook2.zip .\Resources\NetHook2\%CONFIGURATION%\*.dll .\Resources\NetHook2\%CONFIGURATION%\*.pdb'
- ps: |
$args = @('pack', 'SteamKit2\SteamKit2\SteamKit2.csproj')
$version = $null
if (Test-Path Env:APPVEYOR_REPO_TAG_NAME)
{
$version = (Get-Item Env:APPVEYOR_REPO_TAG_NAME).Value
}
if ([string]::IsNullOrEmpty($version))
{
$version = $env:APPVEYOR_BUILD_VERSION + '-Alpha'
}
$args += $('/p:Version=' + $version)
& dotnet $args
test_script:
- ps: |
if ($env:CONFIGURATION -eq 'Debug')
{
& nuget install OpenCover -Version 4.6.519 -OutputDirectory SteamKit2\packages
& SteamKit2\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe -register:user "-target:%ProgramFiles%\dotnet\dotnet.exe" "-targetargs:test SteamKit2\Tests\Tests.csproj" -returntargetcode "-filter:+[SteamKit2]* -[SteamKit2]SteamKit2.Internal.* -[SteamKit2]SteamKit2.*.Internal.* -[SteamKit2]SevenZip*" "-excludebyattribute:*.ProtoContract*" -hideskipped:All -output:SteamKit2-code-coverage.xml -oldStyle
& nuget install Codecov -Version 1.0.3 -OutputDirectory SteamKit2\packages
& SteamKit2\packages\Codecov.1.0.3\tools\codecov.exe -f "SteamKit2-code-coverage.xml"
}
artifacts:
- path: NetHook2.zip
- path: 'SteamKit2\SteamKit2\bin\$(configuration)\*.nupkg'
name: SteamKit2.nupkg
- path: 'Resources\NetHookAnalyzer2\NetHookAnalyzer2\Bin\$(configuration)'
name: NetHookAnalyzer2
deploy:
- provider: NuGet
api_key:
secure: 'Qtxl16gv6dxg4FXOPLiNkLkTuVdPcso3IS99WgRO7IXyqgLJQJ3Ldrnymai2+1Uo'
skip_symbols: false
artifact: SteamKit2.nupkg
on:
configuration: Release
appveyor_repo_tag: true
- provider: GitHub
auth_token:
secure: 'KEOYmhFMh4Ea7RVYmX1Sv/1SWQW5uoNv6p3+aUtJXw/2Vbp2PEmbJxYJxO9xIuc9'
release: 'SteamKit $(appveyor_repo_tag_name)'
artifact: /.*/
draft: false
prerelease: true
tag: $(appveyor_repo_tag_name)
on:
configuration: Release
appveyor_repo_tag: true