TShock/.github/workflows/build.yml
2020-05-24 14:05:57 -07:00

83 lines
3.6 KiB
YAML

name: Build Server
on: [push, pull_request]
jobs:
build:
runs-on: windows-latest
steps:
- name: Git checkout
uses: actions/checkout@v1
with:
submodules: recursive
- name: Installer NuGet client
uses: nuget/setup-nuget@v1
- name: Restore NuGet packages
run: |
nuget restore .\TerrariaServerAPI\TShock.4.OTAPI.sln
nuget restore TShock.sln
- name: Build OTAPI (Debug)
shell: cmd
run: |
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TerrariaServerAPI\TShock.4.OTAPI.sln /p:Configuration=Debug
cd .\TerrariaServerAPI\TShock.Modifications.Bootstrapper\bin\Debug
TShock.Modifications.Bootstrapper.exe
- name: Build TerrariaServerAPI (Debug)
shell: cmd
run: |
cd .\TerrariaServerAPI
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TerrariaServerAPI\TerrariaServerAPI.csproj /p:Configuration=Debug
- name: Build TShock (Debug)
shell: cmd
run: |
nuget restore TShock.sln
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TShockAPI\TShockAPI.csproj /p:Configuration=Debug
- name: Prepare packaging
shell: cmd
run: |
xcopy /Y prebuilts\*.* TShockAPI\bin\Debug
mkdir TShockAPI\bin\Debug\ServerPlugins
move TShockAPI\bin\Debug\TShockAPI.dll TShockAPI\bin\Debug\ServerPlugins
- name: Upload TShock (Debug)
uses: actions/upload-artifact@master
with:
name: Experimental TShock (debug)
path: TShockAPI\bin\Debug
- name: Upload OTAPI Bootstrapper (Debug)
uses: actions/upload-artifact@master
with:
name: Experimental (debug) OTAPI Bootstrapper
path: .\TerrariaServerAPI\TShock.Modifications.Bootstrapper\bin\Debug\TShock.Modifications.Bootstrapper.exe
- name: Build OTAPI (Not Debug)
shell: cmd
run: |
nuget restore .\TerrariaServerAPI\TShock.4.OTAPI.sln
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TerrariaServerAPI\TShock.4.OTAPI.sln /p:Configuration=Release
cd .\TerrariaServerAPI\TShock.Modifications.Bootstrapper\bin\Release
TShock.Modifications.Bootstrapper.exe
- name: Build TerrariaServerAPI (Not Debug)
shell: cmd
run: |
cd .\TerrariaServerAPI
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TerrariaServerAPI\TerrariaServerAPI.csproj /p:Configuration=Release
- name: Build TShock (Not Debug)
shell: cmd
run: |
nuget restore TShock.sln
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TShockAPI\TShockAPI.csproj /p:Configuration=Release
- name: Normalize release packaging
shell: cmd
run: |
xcopy /Y prebuilts\*.* TShockAPI\bin\Release
mkdir TShockAPI\bin\Release\ServerPlugins
move TShockAPI\bin\Release\TShockAPI.dll TShockAPI\bin\Release\ServerPlugins
- name: Upload TShock (Not Debug)
uses: actions/upload-artifact@master
with:
name: Experimental TShock (not debug)
path: TShockAPI\bin\Release
- name: Upload OTAPI Bootstrapper (Not Debug)
uses: actions/upload-artifact@master
with:
name: Experimental (not debug) OTAPI Bootstrapper
path: .\TerrariaServerAPI\TShock.Modifications.Bootstrapper\bin\Release\TShock.Modifications.Bootstrapper.exe