Update workflow
This commit is contained in:
parent
d6a6b1514b
commit
e2afd4a745
1 changed files with 54 additions and 38 deletions
92
.github/workflows/build.yml
vendored
92
.github/workflows/build.yml
vendored
|
|
@ -6,67 +6,83 @@ jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- name: Git checkout
|
||||||
|
uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Install nuget
|
- name: Add MSBuild to environment variable
|
||||||
run: choco install nuget.commandline
|
shell: pwsh
|
||||||
- name: OTAPI Debug
|
run: |
|
||||||
shell: cmd
|
$msbuildPath = Split-Path (& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.Component.MSBuild -find MSBuild\Current\Bin\amd64\MSBuild.exe | Select-Object -First 1) -Parent
|
||||||
|
echo "::set-env name=PATH::$msbuildPath;$env:PATH"
|
||||||
|
- name: Installer NuGet client
|
||||||
|
uses: nuget/setup-nuget@v1
|
||||||
|
- name: Restore NuGet packages
|
||||||
run: |
|
run: |
|
||||||
nuget restore .\TerrariaServerAPI\TShock.4.OTAPI.sln
|
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=Debug
|
nuget restore TShock.sln
|
||||||
|
- name: Build OTAPI (Debug)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
MSBuild.exe .\TerrariaServerAPI\TShock.4.OTAPI.sln /p:Configuration=Debug
|
||||||
cd .\TerrariaServerAPI\TShock.Modifications.Bootstrapper\bin\Debug
|
cd .\TerrariaServerAPI\TShock.Modifications.Bootstrapper\bin\Debug
|
||||||
TShock.Modifications.Bootstrapper.exe
|
TShock.Modifications.Bootstrapper.exe
|
||||||
- name: OTAPI Release
|
- name: Build TerrariaServerAPI (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: TerrariaServerAPI Debug
|
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
cd .\TerrariaServerAPI
|
cd .\TerrariaServerAPI
|
||||||
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TerrariaServerAPI\TerrariaServerAPI.csproj /p:Configuration=Debug
|
MSBuild.exe .\TerrariaServerAPI\TerrariaServerAPI.csproj /p:Configuration=Debug
|
||||||
- name: TShock Debug
|
- name: Build TShock (Debug)
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
nuget restore TShock.sln
|
nuget restore TShock.sln
|
||||||
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TShockAPI\TShockAPI.csproj /p:Configuration=Debug
|
MSBuild.exe .\TShockAPI\TShockAPI.csproj /p:Configuration=Debug
|
||||||
- name: TerrariaServerAPI Release
|
- name: Prepare packaging
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
cd .\TerrariaServerAPI
|
|
||||||
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TerrariaServerAPI\TerrariaServerAPI.csproj /p:Configuration=Release
|
|
||||||
- name: TShock Release
|
|
||||||
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
|
|
||||||
xcopy /Y prebuilts\*.* TShockAPI\bin\Debug
|
xcopy /Y prebuilts\*.* TShockAPI\bin\Debug
|
||||||
mkdir TShockAPI\bin\Debug\ServerPlugins
|
mkdir TShockAPI\bin\Debug\ServerPlugins
|
||||||
mkdir TShockAPI\bin\Release\ServerPlugins
|
|
||||||
move TShockAPI\bin\Release\TShockAPI.dll TShockAPI\bin\Release\ServerPlugins
|
|
||||||
move TShockAPI\bin\Debug\TShockAPI.dll TShockAPI\bin\Debug\ServerPlugins
|
move TShockAPI\bin\Debug\TShockAPI.dll TShockAPI\bin\Debug\ServerPlugins
|
||||||
- uses: actions/upload-artifact@master
|
- name: Upload TShock (Debug)
|
||||||
with:
|
uses: actions/upload-artifact@master
|
||||||
name: Experimental TShock (not debug)
|
|
||||||
path: TShockAPI\bin\Release
|
|
||||||
- uses: actions/upload-artifact@master
|
|
||||||
with:
|
with:
|
||||||
name: Experimental TShock (debug)
|
name: Experimental TShock (debug)
|
||||||
path: TShockAPI\bin\Debug
|
path: TShockAPI\bin\Debug
|
||||||
- uses: actions/upload-artifact@master
|
- name: Upload OTAPI Bootstrapper (Debug)
|
||||||
|
uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
name: Experimental (debug) OTAPI Bootstrapper
|
name: Experimental (debug) OTAPI Bootstrapper
|
||||||
path: .\TerrariaServerAPI\TShock.Modifications.Bootstrapper\bin\Debug\TShock.Modifications.Bootstrapper.exe
|
path: .\TerrariaServerAPI\TShock.Modifications.Bootstrapper\bin\Debug\TShock.Modifications.Bootstrapper.exe
|
||||||
- uses: actions/upload-artifact@master
|
- name: Build OTAPI (Release)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
nuget restore .\TerrariaServerAPI\TShock.4.OTAPI.sln
|
||||||
|
MSBuild.exe .\TerrariaServerAPI\TShock.4.OTAPI.sln /p:Configuration=Release
|
||||||
|
cd .\TerrariaServerAPI\TShock.Modifications.Bootstrapper\bin\Release
|
||||||
|
TShock.Modifications.Bootstrapper.exe
|
||||||
|
- name: Build TerrariaServerAPI (Release)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd .\TerrariaServerAPI
|
||||||
|
MSBuild.exe .\TerrariaServerAPI\TerrariaServerAPI.csproj /p:Configuration=Release
|
||||||
|
- name: Build TShock (Release)
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
nuget restore TShock.sln
|
||||||
|
MSBuild.exe .\TShockAPI\TShockAPI.csproj /p:Configuration=Release
|
||||||
|
- name: Prepare 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 (Release)
|
||||||
|
uses: actions/upload-artifact@master
|
||||||
|
with:
|
||||||
|
name: Experimental TShock (not debug)
|
||||||
|
path: TShockAPI\bin\Release
|
||||||
|
- name: Upload OTAPI Bootstrapper (Release)
|
||||||
|
uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
name: Experimental (not debug) OTAPI Bootstrapper
|
name: Experimental (not debug) OTAPI Bootstrapper
|
||||||
path: .\TerrariaServerAPI\TShock.Modifications.Bootstrapper\bin\Release\TShock.Modifications.Bootstrapper.exe
|
path: .\TerrariaServerAPI\TShock.Modifications.Bootstrapper\bin\Release\TShock.Modifications.Bootstrapper.exe
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue