From 79b092b9c13e21df684f342708ef0f74bb72cd4e Mon Sep 17 00:00:00 2001 From: SGKoishi Date: Wed, 2 Oct 2019 11:17:37 -0700 Subject: [PATCH] Add GitHub Actions build script and badge --- .github/workflows/msbuild-test.yml | 34 +++++++++++++++++++++++++++--- README.md | 2 +- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/.github/workflows/msbuild-test.yml b/.github/workflows/msbuild-test.yml index 3ed2d884..5763e4d4 100644 --- a/.github/workflows/msbuild-test.yml +++ b/.github/workflows/msbuild-test.yml @@ -7,7 +7,35 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@master - - uses: actions/setup-dotnet@v1 with: - dotnet-version: '4.5.1' - - run: dotnet build --configuration Release ./TShockAPI/TShockAPI.csproj + submodules: recursive + - name: Download MSBuild installer + run: powershell "$source = (New-Object System.Net.WebClient).DownloadString(\"https://gist.githubusercontent.com/sgkoishi/87e613881f9164bf03849603dd4f4266/raw/\") ; Add-Type + -TypeDefinition \"$source\" ; [SetupMSBuild]::Download((Get-Item -Path \".\\\").FullName); + " + - name: Setup .NET SDK + run: start /i /wait vs_BuildTools.exe --add "Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools" -p --wait --installPath "%cd%\VSBuildTools" --norestart --nocache + - name: OTAPI Debug + run: | + nuget.exe restore .\TerrariaServerAPI\TShock.4.OTAPI.sln + ".\VSBuildTools\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: OTAPI Release + run: | + nuget.exe restore .\TerrariaServerAPI\TShock.4.OTAPI.sln + ".\VSBuildTools\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 + run: | + cd .\TerrariaServerAPI + "..\VSBuildTools\MSBuild\Current\Bin\MSBuild.exe" .\TerrariaServerAPI\TerrariaServerAPI.csproj /p:Configuration=Release + - name: TShock + run: | + nuget.exe restore TShock.sln + ".\VSBuildTools\MSBuild\Current\Bin\MSBuild.exe" .\TShockAPI\TShockAPI.csproj /p:Configuration=Release + - uses: actions/upload-artifact@master + with: + name: TShockRelease + path: TShockAPI\bin\Release diff --git a/README.md b/README.md index 5f5fda63..f6cd3f55 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

TShock for Terraria
- Build StatusAppVeyor Build StatusAll contributors
+ Build StatusAppVeyor Build StatusGitHub Actions Build StatusAll contributors

TShock is a toolbox for Terraria servers and communities. That toolbox is jam packed with anti-cheat tools, server-side characters, groups, permissions, item bans, tons of commands, and limitless potential. It's one of a kind.