forked from LunaMultiplayer/LunaMultiplayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
139 lines (122 loc) · 6.4 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
# Reference: http://www.appveyor.com/docs/appveyor-yml
# Notes:
# - Indent each level of configuration with 2 spaces. Do not use tabs!
#---------------------------------#
# general configuration #
#---------------------------------#
version: $(smallversion).{build}
# Do not build on tags (GitHub and BitBucket)
skip_tags: true
#Do not build if we change any of this files
skip_commits:
files:
- '**/*.md'
- '**/*.editorconfig'
image: Visual Studio 2019
#---------------------------------#
# environment configuration #
#---------------------------------#
environment:
smallversion: 0.25.0
WEBHOOK_URL:
secure: bhCOtyDF+wInocIkKfUQdxpM4csyVv7cxhUGz0NzLnFrlEZsaviEDJeDbctuv4NBM4xPkl4Wpv3rb6VwNcvEr8IWW5Te0P/kx1VeNMD5espcLKzMwy46shi630b3wvIipOeBnupc6nsiw7/2liuNhJkvjdyu4wxQXVDVWNSi+t0=
ZIPPASSWORD:
secure: aYtowPY3EEDAWEnow3/CajwQYL9PtdXpVdSqhC3f5X4=
cache:
- packages -> **\packages.config
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}-$(configuration)'
#---------------------------------#
# build configuration #
#---------------------------------#
configuration:
- Debug
- Release
platform: Any CPU
before_build:
- ps: 7z e "$env:appveyor_build_folder\External\KSPLibraries\KSPLibraries.7z" -p"$env:ZIPPASSWORD" -o"$env:appveyor_build_folder\External\KSPLibraries"
- nuget restore
build:
parallel: true
verbosity: minimal
after_build:
#Client post build commands
- ps: mkdir "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPClient\GameData\LunaMultiplayer\Button"
- ps: mkdir "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPClient\GameData\LunaMultiplayer\Plugins"
- ps: mkdir "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPClient\GameData\LunaMultiplayer\Localization"
- ps: mkdir "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPClient\GameData\LunaMultiplayer\PartSync"
- ps: mkdir "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPClient\GameData\LunaMultiplayer\Icons"
- ps: mkdir "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPClient\GameData\LunaMultiplayer\Flags"
- ps: copy "$env:appveyor_build_folder\LMP Readme.txt" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMP Readme.txt"
- ps: xcopy /y "$env:appveyor_build_folder\LmpClient\Resources\*.*" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPClient\GameData\LunaMultiplayer\Button"
- ps: xcopy /y "$env:appveyor_build_folder\LmpClient\bin\$env:configuration\*.*" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPClient\GameData\LunaMultiplayer\Plugins"
- ps: xcopy /y /s "$env:appveyor_build_folder\LmpClient\Localization\XML\*.*" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPClient\GameData\LunaMultiplayer\Localization"
- ps: xcopy /y /s "$env:appveyor_build_folder\LmpClient\ModuleStore\XML\*.*" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPClient\GameData\LunaMultiplayer\PartSync"
- ps: xcopy /y "$env:appveyor_build_folder\LmpClient\Resources\Icons\*.*" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPClient\GameData\LunaMultiplayer\Icons"
- ps: xcopy /y "$env:appveyor_build_folder\LmpClient\Resources\Flags\*.*" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPClient\GameData\LunaMultiplayer\Flags"
#Master server post build commands
- ps: mkdir "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPMasterServer"
- ps: xcopy /y "$env:appveyor_build_folder\MasterServer\bin\$env:configuration\*.*" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPMasterServer"
#Server server post build commands
- ps: mkdir "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPServer"
- ps: xcopy /y "$env:appveyor_build_folder\Server\bin\$env:configuration\*.*" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPServer"
#7zip everything
- ps: 7z a "$env:appveyor_build_folder\LunaMultiplayer-$env:configuration.zip" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMP Readme.txt" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPClient" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPServer"
- ps: 7z a "$env:appveyor_build_folder\LunaMultiplayerMasterServer-$env:configuration.zip" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPMasterServer"
#Post it on discord
on_success:
- ps: Invoke-RestMethod https://raw.githubusercontent.com/LunaMultiplayer/LunaMultiplayer/master/appveyor_discord.ps -o appveyor_discord.ps1
- ps: if ($env:configuration -like "Debug") {./appveyor_discord.ps1 success $env:WEBHOOK_URL}
#---------------------------------#
# artifacts configuration #
#---------------------------------#
artifacts:
- path: .\LunaMultiplayer-$(configuration).zip
name: LunaMultiplayer-$(configuration).zip
- path: .\LunaMultiplayerMasterServer-$(configuration).zip
name: LunaMultiplayerMasterServer-$(configuration).zip
#---------------------------------#
# deployment configuration #
#---------------------------------#
deploy:
- provider: GitHub
tag: $(smallversion)-Draft
release: Luna Multi Player $(smallversion)-Draft
description: 'Build $(appveyor_build_version)'
artifact: LunaMultiplayer-$(configuration).zip
auth_token:
secure: zWJqDvz3LjR2J358JIJKICwghW/DWRzs73KWb3KApTLOreA4c8DN1tos+O3qBMR7
draft: true
force_update: true
on:
branch: master
#---------------------------------#
# notifications #
#---------------------------------#
notifications:
- provider: Webhook
url: http://system.robo-web.nl/webhook/luna-debug.php
on_build_success: true
on_build_failure: true
on_build_status_changed: true
- provider: Webhook
url: http://godarklight.info.tm/dmp/lmp.php
on_build_success: true
on_build_failure: true
on_build_status_changed: true
- provider: Webhook
url: https://registry.hub.docker.com/u/thesystem/lunamultiplayer/trigger/d9d50936-8115-40b9-a087-24330d5cc59c/
on_build_success: true
on_build_failure: true
on_build_status_changed: true
#Old webhook for discord...
# - provider: Webhook
# url: https://skyhook.glitch.me/api/webhooks/428098094928756737/u2FRiQ-zKyEozSTCUX2DVbqZfCaXR6r3BhX6UCvLYBqbxzvcQDeo9mRdw1HXYR_9Ckua/appveyor
# content_type: application/json
# on_build_success: true
# on_build_failure: false
# on_build_status_changed: false