-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
66 lines (58 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
---
image: Visual Studio 2017
version: '0.1.{build}'
assembly_info:
patch: true
file: MyVersion.cs
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
configuration: Release
before_build:
- cmd: nuget restore
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq "true") {
${env:ZIP_ARTIFACT_NAME} = "OWRankTracker-$env:APPVEYOR_REPO_TAG_NAME.zip";
${env:ZIP_ARTIFACT_PATH} = "OWRankTracker\bin\$env:CONFIGURATION\OWRankTracker-$env:APPVEYOR_REPO_TAG_NAME.zip";
${env:MSI_ARTIFACT_NAME} = "OWRankTracker-$env:APPVEYOR_REPO_TAG_NAME.msi";
${env:MSI_ARTIFACT_PATH} = "OWRankTracker.Installer\bin\$env:CONFIGURATION\OverwatchRankTracker.msi";
} else {
${env:ZIP_ARTIFACT_NAME} = "OWRankTracker-build-$env:APPVEYOR_BUILD_VERSION.zip";
${env:ZIP_ARTIFACT_PATH} = "OWRankTracker\bin\$env:CONFIGURATION\OWRankTracker-$env:APPVEYOR_BUILD_VERSION.zip";
${env:MSI_ARTIFACT_NAME} = "OWRankTracker-build-$env:APPVEYOR_BUILD_VERSION.msi";
${env:MSI_ARTIFACT_PATH} = "OWRankTracker.Installer\bin\$env:CONFIGURATION\OverwatchRankTracker.msi";
}
Write-Host "ZIP_ARTIFACT_NAME: $env:ZIP_ARTIFACT_NAME";
Write-Host "ZIP_ARTIFACT_PATH: $env:ZIP_ARTIFACT_PATH";
Write-Host "MSI_ARTIFACT_NAME: $env:MSI_ARTIFACT_NAME";
Write-Host "MSI_ARTIFACT_PATH: $env:MSI_ARTIFACT_PATH";
build:
parallel: true
project: OWRankTracker.sln
verbosity: minimal
test:
assemblies:
only:
- OWRankTracker.Test\bin\$(configuration)\OWRankTracker.Test.dll
- OWRankTracker.Core.Test\bin\$(Configuration)\OWRankTracker.Core.Test.dll
# Cannot deploy multiple artifacts to the same GitHub release
# so need to use scripts to push multiple artifacts to the same
# deployment name, used as the artifact name
# https://www.appveyor.com/docs/packaging-artifacts/#packaging-multiple-files-in-different-locations-into-a-single-archive
# https://www.appveyor.com/docs/build-worker-api/#push-artifact
after_test:
- ps: >-
7z a $env:ZIP_ARTIFACT_PATH -r $env:APPVEYOR_BUILD_FOLDER\OWRankTracker\bin\$env:CONFIGURATION\*;
Push-AppveyorArtifact $env:ZIP_ARTIFACT_PATH -DeploymentName GitHubArtifacts -FileName $env:ZIP_ARTIFACT_NAME;
Push-AppveyorArtifact $env:MSI_ARTIFACT_PATH -DeploymentName GitHubArtifacts -FileName $env:MSI_ARTIFACT_NAME;
before_deploy:
- ps: >-
${env:release_description} = (Get-Content "./ReleaseNotes/${env:APPVEYOR_REPO_TAG_NAME}.txt") -join "`n";
deploy:
- provider: GitHub
auth_token:
secure: RM5VRaDPrGHUmXhx2H9fF75MzpjeeCsTiSdDA8geFD3fFWz9JawwezptRY+eeQsX
artifact: GitHubArtifacts
description: $(release_description)
on:
appveyor_repo_tag: true