-
-
Notifications
You must be signed in to change notification settings - Fork 34
/
appveyor.yml
74 lines (67 loc) · 2.8 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
version: CI-{build}
branches:
only:
- master
image: Visual Studio 2022
configuration:
- Release
platform: Any CPU
environment:
CODECOV_TOKEN: e818e36f-09e0-4a85-9b5a-4b89e55b5263
init:
- ps: |-
# Update Build Version
if ($env:APPVEYOR_REPO_TAG -eq "true")
{
Update-AppveyorBuild -Version "$env:APPVEYOR_REPO_TAG_NAME"
}
before_build:
- ps: |-
dotnet --version
dotnet restore ./Source/Reloaded.Hooks.sln
# Build the Changelog
if ($env:APPVEYOR_REPO_TAG -eq "true")
{
$env:CHANGELOG_PATH = "CHANGELOG.MD"
& npm install -g auto-changelog
& auto-changelog --sort-commits date --hide-credit --commit-limit false --starting-version $env:APPVEYOR_REPO_TAG_NAME -o $env:CHANGELOG_PATH
$env:CHANGELOG_TEXT = Get-Content -Path $env:CHANGELOG_PATH -Raw
}
build:
project: ./Source/Reloaded.Hooks.sln
verbosity: minimal
test_script:
- ps: |-
dotnet tool install --global altcover.global --version 8.2.833
$ipmo = (AltCover ImportModule | Out-String)
Invoke-Expression $ipmo
dotnet test -f net6.0 .\source\Reloaded.Hooks.Tests.X86\Reloaded.Hooks.Tests.X86.csproj /p:AltCover=true /p:CopyLocalLockFileAssemblies="true" /p:AltCoverAttributeFilter="ExcludeFromCodeCoverageAttribute" /p:AltCoverAssemblyExcludeFilter="Reloaded.Hooks.Tests.X86|Reloaded.Hooks.Tests.X64|Reloaded.Hooks.Tests.Shared|xunit\.*" /p:AltCoverTypeFilter="xunit\.*|AltCover\.*|Reloaded\.Assembler.*" /p:AltCoverReport="../../coverage-86.xml"
dotnet test -f net6.0 .\source\Reloaded.Hooks.Tests.X64\Reloaded.Hooks.Tests.X64.csproj /p:AltCover=true /p:CopyLocalLockFileAssemblies="true" /p:AltCoverAttributeFilter="ExcludeFromCodeCoverageAttribute" /p:AltCoverAssemblyExcludeFilter="Reloaded.Hooks.Tests.X86|Reloaded.Hooks.Tests.X64|Reloaded.Hooks.Tests.Shared|xunit\.*" /p:AltCoverTypeFilter="xunit\.*|AltCover\.*|Reloaded\.Assembler.*" /p:AltCoverReport="../../coverage-64.xml"
Get-ChildItem coverage-* | Merge-OpenCover -OutputFile "Coverage.xml" | Out-Null
choco install codecov -f -y | Out-Null
codecov -f "./Coverage.xml"
artifacts:
- path: Coverage.xml
name: Coverage
- path: CHANGELOG.MD
name: Changelog
- path: Source\Reloaded.Hooks\bin\Release\*.nupkg
name: Release NuGet
- path: Source\Reloaded.Hooks.Definitions\bin\Release\*.nupkg
name: Release NuGet Definitions
deploy:
- provider: NuGet
api_key:
secure: /T4vdj8lFWKOcuR5WguX5THrC1DYP4ofjy8yCdm3pz9T/yBMqEZoQKXvVzEBu965
artifact: Release NuGet, Release NuGet Definitions
on:
CONFIGURATION: Release
APPVEYOR_REPO_TAG: true
- provider: GitHub
description: $(CHANGELOG_TEXT)
auth_token:
secure: 3nktB3Ovacl0onzwjgI+F7MtWvAzl1YMIA5gRE+vsVwKzFHICg1wKlj9O63IIiwS
artifact: Release NuGet, Release NuGet Definitions
on:
CONFIGURATION: Release
APPVEYOR_REPO_TAG: true