forked from musicbeeremote/mbrc-plugin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappveyor.yml
70 lines (57 loc) · 2.09 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
-
branches:
only:
- master
image: Visual Studio 2019
init:
- choco install opencover.portable
- choco install codecov
configuration: Debug
environment:
sonar_token:
secure: LLfkNoO+wSL10x6SzsOXLzusjKMLXBCBDYSvQZf8bLo5ZniA00IXghGc566o9Rdn
before_build:
- nuget restore
- ps: >-
if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
choco install "sonarscanner-msbuild-net46" -y
SonarScanner.MSBuild.exe begin /k:"musicbeeremote_plugin" /d:"sonar.host.url=https://sonarcloud.io" /o:"musicbeeremote" /d:"sonar.login=$env:sonar_token" /v:"$env:APPVEYOR_BUILD_NUMBER" /d:sonar.cs.opencover.reportsPaths="$env:CD\coverage.xml"
}
build:
verbosity: minimal
project: MBRC.sln
after_build:
-
test_script:
- OpenCover.Console.exe -register:administrator -target:"nunit3-console.exe" -targetargs:".\build\bin\Debug\mbrc-core.Test.dll --result:nunitTestResult.xml" -output:".\coverage.xml" "-filter:+[*]* -[*.Test]*"
- codecov -f "coverage.xml"
after_test:
- ps: >-
if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
SonarScanner.MSBuild.exe end /d:sonar.login="$env:sonar_token"
}
-
branches:
only:
- /v\d*\.\d*\.\d*/
image: Visual Studio 2019
configuration: Release
before_build:
- nuget restore
artifacts:
- path: release\dist\musicbee_remote_$(APPVEYOR_REPO_TAG_NAME).zip
name: archive
- path: release\dist\musicbee_remote_$(APPVEYOR_REPO_TAG_NAME).exe
name: installer
build_script:
- cd .\release && release.bat
deploy:
release: $(APPVEYOR_REPO_TAG_NAME)
tag: $(APPVEYOR_REPO_TAG_NAME)
provider: GitHub
auth_token:
secure: B3xXgycUMsd6TTbYsT1qXm1ggbTFR4ciVLvkXOOUvfG1MIEugP1u5tt7Sbhtzvml # your encrypted token from GitHub
artifact: release\dist\musicbee_remote_$(APPVEYOR_REPO_TAG_NAME).zip, release\dist\musicbee_remote_$(APPVEYOR_REPO_TAG_NAME).exe
draft: true
on:
APPVEYOR_REPO_TAG: true # deploy on tag push only