forked from Necrobot-Private/NecroBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
237 lines (191 loc) · 9.71 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
#---------------------------------#
# general configuration #
#---------------------------------#
# version format
version: 0.0.0.{build}
# Do not build on tags
skip_tags: false
# Start builds on tags only
skip_non_tags: false
# Skipping commits affecting specific files
skip_commits:
files:
- '**\AssemblyInfo.*'
- 'CHANGELOG.md'
#
pull_requests:
do_not_increment_build_number: true
#---------------------------------#
# environment configuration #
#---------------------------------#
# Build worker image (VM template)
image: Visual Studio 2015
# scripts that are called at very beginning, before repo cloning
init:
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq "true")
{
$env:NecroBot2_Version = "$($env:APPVEYOR_REPO_TAG_NAME.Replace('v', ''))";
}
else
{
$env:NecroBot2_Version = "$($env:APPVEYOR_BUILD_VERSION)";
}
# clone directory
clone_folder: c:\projects\necrobot2
# fetch repository as zip archive
shallow_clone: false
# set clone depth
#clone_depth: 5 # clone entire repository history if not defined
# environment variables
environment:
access_token:
secure: txeoAG8V3UC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o0hLtV8aPxcRUEwb8h5e0lCUUdws3TFm3WYUiO4Vkzt5vCijgXmY2sctcjRT+vJK+G/dPS0YAd3hoqonk9OQyPQ7w/Vz9Z+OmcMZKR7LfyMh1I8Ylu+hAH7TuEfVnMB4do3xelwc8Rgs=
# build cache to preserve files/folders between builds
#cache:
# - packages -> **\packages.config # preserve packages directory in the root of build folder but will reset it if packages.config is modified
# - '%LocalAppData%\NuGet\Cache'
# scripts that run after cloning repository
install:
- git submodule update --init --recursive
- cd PoGo.NecroBot.GUI.Electron && npm install && cd ..
# enable patching of AssemblyInfo.* files
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '$(NecroBot2_Version)'
assembly_file_version: "1.0.0.0"
assembly_informational_version: '$(APPVEYOR_REPO_TAG_NAME)'
#---------------------------------#
# build configuration #
#---------------------------------#
# build platform, i.e. x86, x64, Any CPU. This setting is optional.
platform: x86
# to add several platforms to build matrix:
#platform:
# - x86
# - Any CPU
# build Configuration, i.e. Debug, Release, etc.
configuration: Release
# to add several configurations to build matrix:
#configuration:
# - Debug
# - Release
build:
# MSBuild verbosity level
verbosity: minimal
# scripts to run before build
before_build:
- nuget restore
- cd PoGo.NecroBot.GUI.Electron && npm run pack && cd ..
# scripts to run *after* solution is built and *before* automatic packaging occurs (web apps, NuGet packages, Azure Cloud Services)
before_package:
# scripts to run after build
after_build:
- ps: >-
Remove-Item "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)" -Recurse -ErrorAction Ignore;
New-Item -ItemType Directory -Force -Path "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)";
New-Item -ItemType Directory -Force -Path "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)";
if ($env:PLATFORM -eq "x86")
{
Move-Item -Path "$($env:APPVEYOR_BUILD_FOLDER)\PoGo.NecroBot.CLI\bin\$($env:PLATFORM)\$($env:CONFIGURATION)" -Destination "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\NecroBot2" -Force;
Move-Item -Path "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\NecroBot2\GUI" -Destination "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\NecroBot2GUI" -Force;
}
elseif ($env:PLATFORM -eq "x64")
{
Move-Item -Path "$($env:APPVEYOR_BUILD_FOLDER)\PoGo.NecroBot.CLI\bin\$($env:PLATFORM)\$($env:CONFIGURATION)" -Destination "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\NecroBot2" -Force;
Move-Item -Path "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\NecroBot2\GUI" -Destination "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\NecroBot2GUI" -Force;
}
elseif ($env:PLATFORM -eq "Any CPU")
{
Move-Item -Path "$($env:APPVEYOR_BUILD_FOLDER)\PoGo.NecroBot.CLI\bin\$($env:CONFIGURATION)" -Destination "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\NecroBot2" -Force;
Move-Item -Path "$($env:APPVEYOR_BUILD_FOLDER)\PoGo.NecroBot.CLI\bin\x86\$($env:CONFIGURATION)\GUI" -Destination "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\NecroBot2GUI" -Force;
}
Move-Item -Path "$($env:APPVEYOR_BUILD_FOLDER)\PoGo.NecroBot.GUI.Electron\dist\win-ia32-unpacked" -Destination "$($env:APPVEYOR_BUILD_FOLDER)\$($env:PLATFORM)\$($env:CONFIGURATION)\NecroBot2GUI.Electron" -Force;
# to run your custom scripts instead of automatic MSBuild
build_script:
#---------------------------------#
# tests configuration #
#---------------------------------#
# to disable automatic tests
test: off
#---------------------------------#
# artifacts configuration #
#---------------------------------#
artifacts:
- path: '\$(PLATFORM)\$(CONFIGURATION)\NecroBot2'
name: NecroBot2.Console
- path: '\$(PLATFORM)\$(CONFIGURATION)\NecroBot2GUI'
name: NecroBot2.GUI
- path: '\$(PLATFORM)\$(CONFIGURATION)\NecroBot2GUI.Electron'
name: NecroBot2.GUI.Electron
#---------------------------------#
# deployment configuration #
#---------------------------------#
# providers: Local, FTP, WebDeploy, AzureCS, AzureBlob, S3, NuGet, Environment
# provider names are case-sensitive!
deploy:
# Deploy to GitHub Releases
- provider: GitHub
tag: $(APPVEYOR_REPO_TAG_NAME)
description: '[CHANGELOG.md](https://github.com/Necrobot-Private/NecroBot/blob/master/CHANGELOG.md)'
release: NecroBot2 $(APPVEYOR_REPO_TAG_NAME)
auth_token: $(access_token)
artifact: NecroBot2.Console;NecroBot2.GUI;NecroBot2.GUI.Electron
draft: false
prerelease: false
force_update: true
on:
appveyor_repo_tag: true
# scripts to run before deployment
before_deploy:
- ps: >-
$fileContent = "-----BEGIN RSA PRIVATE KEY-----`n";
$fileContent += $env:priv_key.Replace(' ', "`n");
$fileContent += "`n-----END RSA PRIVATE KEY-----`n";
Set-Content "$env:USERPROFILE\.ssh\id_rsa" "$($fileContent)";
Set-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):[email protected]`n";
- git config --global credential.helper store
- git config --global user.email "%github_email%"
- git config --global user.name "%github_user%"
- git checkout -b Appveyor "%APPVEYOR_REPO_BRANCH%"
- SET PATH=C:\Ruby23\bin;%PATH%
- git add "PoGo.NecroBot.CLI/Properties/AssemblyInfo.cs"
- git add "PoGo.NecroBot.GUI/Properties/AssemblyInfo.cs"
- git add "PoGo.NecroBot.Logic/Properties/AssemblyInfo.cs"
- git commit -m "%APPVEYOR_REPO_TAG_NAME%"
- git checkout "%APPVEYOR_REPO_BRANCH%"
- git merge Appveyor
- git branch -d Appveyor
- git pull "origin" "%APPVEYOR_REPO_BRANCH%"
- git push "origin" "%APPVEYOR_REPO_BRANCH%"
# scripts to run after deployment
after_deploy:
# to run your custom scripts instead of provider deployments
deploy_script:
# to disable deployment
#deploy: off
#---------------------------------#
# global handlers #
#---------------------------------#
# on successful build
on_success:
# on build failure
on_failure:
# after build failure or success
on_finish:
#---------------------------------#
# notifications configuration #
#---------------------------------#
notifications:
- provider: Webhook
url: https://webhooks.gitter.im/e/edd3d77d0afd21a6916b
on_build_success: true
on_build_failure: true
on_build_status_changed: true