-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathappveyor.yml
51 lines (51 loc) · 2.26 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
version: 1.0.{build}
skip_tags: true
image: Visual Studio 2022
init:
- git config --global core.autocrlf true
environment:
access_token:
secure: Eq6BjtZ80BXKLwFMg76IjuQAvbLjbojIF/X/ARouGVhxPneJtgDfCXMPNgJ7KBKq
sonar_token:
secure: W7pHKhuTW6Lh8WlXJNTOIaOzeuxLi+H6Nqmnm4pr28jM6jyIpOZ+1r10lIQi0eCA
JAVA_HOME: C:\Program Files\Java\jdk19
nuget:
disable_publish_on_pr: true
build_script:
- dotnet --info
- dotnet restore
- dotnet build -c Release
- dotnet pack --include-symbols --include-source -c Release CueGen
- dotnet publish -r win-x64 -p:PublishSingleFile=true --self-contained true -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishTrimmed=true -c Release CueGen.Console
- 7z a -mx=9 CueGen.%APPVEYOR_BUILD_VERSION%.win-x64.exe.zip ".\CueGen.Console\bin\Release\net6.0\win-x64\publish\CueGen.Console.exe"
- dotnet publish -r osx-x64 -p:PublishSingleFile=true --self-contained true -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishTrimmed=true -c Release CueGen.Console
- 7z a -mx=9 CueGen.%APPVEYOR_BUILD_VERSION%.osx-x64.zip ".\CueGen.Console\bin\Release\net6.0\osx-x64\publish\CueGen.Console"
test_script:
- ps: |
if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
dotnet tool install --global dotnet-sonarscanner
dotnet sonarscanner begin /k:"mganss_CueGen" /v:$env:APPVEYOR_BUILD_VERSION /o:"mganss-github" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.token="$env:sonar_token" /d:sonar.cs.opencover.reportsPaths="$($env:APPVEYOR_BUILD_FOLDER)\coverage.xml" /d:sonar.coverage.exclusions="**/Program.cs"
dotnet build
}
- dotnet test /p:CollectCoverage=true CueGen.Test\CueGen.Test.csproj
- ps: cp coverage.*.xml ./coverage.xml
- ps: |
if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
dotnet sonarscanner end /d:sonar.token="$env:sonar_token"
}
- pip install codecov
- codecov -f "coverage.xml"
artifacts:
- path: 'CueGen\**\*.*nupkg'
- path: 'CueGen.*.zip'
deploy:
- provider: GitHub
tag: v$(APPVEYOR_BUILD_VERSION)
release: $(APPVEYOR_BUILD_VERSION)
description: '$(APPVEYOR_REPO_COMMIT_MESSAGE)'
auth_token:
secure: Eq6BjtZ80BXKLwFMg76IjuQAvbLjbojIF/X/ARouGVhxPneJtgDfCXMPNgJ7KBKq
artifact: /CueGen\..*\.zip/
draft: true
on:
branch: master