forked from LunaMultiplayer/LunaMultiplayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
159 lines (141 loc) · 9.87 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
# 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 2022
#---------------------------------#
# environment configuration #
#---------------------------------#
environment:
smallversion: 0.29.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"
- ps: mkdir "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPClient\GameData\LunaMultiplayer\"
#Copy harmony dependency
- ps: xcopy /y /s "$env:appveyor_build_folder\External\Dependencies\Harmony" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPClient\GameData"
- 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: copy "$env:appveyor_build_folder\LunaMultiplayer.version" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPClient\GameData\LunaMultiplayer\LunaMultiplayer.version"
- 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: dotnet publish "$env:appveyor_build_folder\MasterServer\MasterServer.csproj" --configuration $env:CONFIGURATION --output "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPMasterServer" --os linux --self-contained false -p:PublishSingleFile=false
#Server post build commands
- ps: dotnet publish "$env:appveyor_build_folder\Server\Server.csproj" --configuration $env:CONFIGURATION --output "$env:appveyor_build_folder\FinalFiles\win-x64-$env:configuration\LMPServer" --os win --self-contained true -p:PublishSingleFile=false -p:PublishTrimmed=true
- ps: dotnet publish "$env:appveyor_build_folder\Server\Server.csproj" --configuration $env:CONFIGURATION --output "$env:appveyor_build_folder\FinalFiles\linux-x64-$env:configuration\LMPServer" --os linux --self-contained true -p:PublishSingleFile=false -p:PublishTrimmed=true
- ps: dotnet publish "$env:appveyor_build_folder\Server\Server.csproj" --configuration $env:CONFIGURATION --output "$env:appveyor_build_folder\FinalFiles\linux-arm64-$env:configuration\LMPServer" --os linux --arch arm64 --self-contained true -p:PublishSingleFile=false -p:PublishTrimmed=true
- ps: dotnet publish "$env:appveyor_build_folder\Server\Server.csproj" --configuration $env:CONFIGURATION --output "$env:appveyor_build_folder\FinalFiles\linux-arm-$env:configuration\LMPServer" --os linux --arch arm --self-contained true -p:PublishSingleFile=false -p:PublishTrimmed=true
- ps: dotnet publish "$env:appveyor_build_folder\Server\Server.csproj" --configuration $env:CONFIGURATION --output "$env:appveyor_build_folder\FinalFiles\any-$env:configuration\LMPServer" --self-contained false -p:PublishSingleFile=false
#7zip everything
- ps: 7z a "$env:appveyor_build_folder\LunaMultiplayer-Client-$env:configuration.zip" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMP Readme.txt" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMPClient\GameData"
- ps: 7z a "$env:appveyor_build_folder\LunaMultiplayer-Server-win-x64-$env:configuration.zip" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMP Readme.txt" "$env:appveyor_build_folder\FinalFiles\win-x64-$env:configuration\LMPServer"
- ps: 7z a "$env:appveyor_build_folder\LunaMultiplayer-Server-linux-x64-$env:configuration.zip" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMP Readme.txt" "$env:appveyor_build_folder\FinalFiles\linux-x64-$env:configuration\LMPServer"
- ps: 7z a "$env:appveyor_build_folder\LunaMultiplayer-Server-linux-arm64-$env:configuration.zip" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMP Readme.txt" "$env:appveyor_build_folder\FinalFiles\linux-arm64-$env:configuration\LMPServer"
- ps: 7z a "$env:appveyor_build_folder\LunaMultiplayer-Server-linux-arm32-$env:configuration.zip" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMP Readme.txt" "$env:appveyor_build_folder\FinalFiles\linux-arm-$env:configuration\LMPServer"
- ps: 7z a "$env:appveyor_build_folder\LunaMultiplayer-Server-any-$env:configuration.zip" "$env:appveyor_build_folder\FinalFiles\$env:configuration\LMP Readme.txt" "$env:appveyor_build_folder\FinalFiles\any-$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: |
if ($env:configuration -like "Debug") {
Invoke-RestMethod https://raw.githubusercontent.com/LunaMultiplayer/LunaMultiplayer/master/appveyor_discord.ps1 -o appveyor_discord.ps1
./appveyor_discord.ps1 success $env:WEBHOOK_URL
}
#---------------------------------#
# artifacts configuration #
#---------------------------------#
artifacts:
- path: .\LunaMultiplayer-Client-$(configuration).zip
name: LunaMultiplayer-Client-$(configuration).zip
- path: .\LunaMultiplayer-Server-win-x64-$(configuration).zip
name: LunaMultiplayer-Server-win-x64-$(configuration).zip
- path: .\LunaMultiplayer-Server-linux-x64-$(configuration).zip
name: LunaMultiplayer-Server-linux-x64-$(configuration).zip
- path: .\LunaMultiplayer-Server-linux-arm64-$(configuration).zip
name: LunaMultiplayer-Server-linux-arm64-$(configuration).zip
- path: .\LunaMultiplayer-Server-linux-arm32-$(configuration).zip
name: LunaMultiplayer-Server-linux-arm32-$(configuration).zip
- path: .\LunaMultiplayer-Server-any-$(configuration).zip
name: LunaMultiplayer-Server-any-$(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-Client-$(configuration).zip, LunaMultiplayer-Server-win-x64-$(configuration).zip, LunaMultiplayer-Server-linux-x64-$(configuration).zip, LunaMultiplayer-Server-linux-arm64-$(configuration).zip, LunaMultiplayer-Server-linux-arm32-$(configuration).zip, LunaMultiplayer-Server-any-$(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.privatedns.org/dmp/lmp.php
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