-
Notifications
You must be signed in to change notification settings - Fork 2
/
appveyor.yml
59 lines (52 loc) · 1.66 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
version: "{build}"
configuration:
- Debug
- Release
before_build:
ps: |
$isReleaseConfiguration = $env:CONFIGURATION -eq "Release"
$isTagged = $env:APPVEYOR_REPO_TAG -eq "true"
$env:BUILD_RELEASE = $isReleaseConfiguration -and $isTagged
if ($env:BUILD_RELEASE -eq "True") {
Add-AppveyorMessage "Building RELEASE version"
} else {
Add-AppveyorMessage "Building NON-RELEASE version"
}
build_script:
ps: |
if ($env:BUILD_RELEASE -eq "True") {
./build --configuration="$env:CONFIGURATION" --release=true
} else {
./build --configuration="$env:CONFIGURATION"
}
after_build:
ps: |
$env:BUILD_VERSION = (cat .build/meta/VERSION)
$env:BUILD_PRERELEASE = (cat .build/meta/PRERELEASE)
$changeLog = (cat .build/meta/CHANGELOG)
if ($changeLog -eq $null) {
$env:BUILD_CHANGELOG = ""
} else {
$env:BUILD_CHANGELOG = [System.String]::Join("\n", $changeLog)
}
$versionMessage = "Version: $env:BUILD_VERSION"
if ($env:BUILD_PRERELEASE -eq "true") {
$versionMessage += " (PRERELEASE)"
}
Add-AppveyorMessage "$versionMessage"
Add-AppveyorMessage "Changes:`n$env:BUILD_CHANGELOG"
test: off
artifacts:
- path: '.build\pkg\$(configuration)\*.zip'
name: ZipPackage
deploy:
- provider: GitHub
release: v$(BUILD_VERSION)
description: $(BUILD_CHANGELOG)
auth_token:
secure: DeybnBneYj+8rA/aC23jBo0XPTw7r6jfE1BkSmbUurSc1PMeZIudi6lX4/zvoqCP
artifact: ZipPackage
draft: false
prerelease: $(BUILD_PRERELEASE)
on:
build_release: True