Fix GitHub Actions with updated Windows Server 2019 builder
This changeset fixes several problems with the github actions build. It removes the dependency on a repo script to install msbuild + VS. It switches the shell back to cmd.exe, so that the scripts in build.yml continue to run. It installs nuget via chocolatey, since that's not on the path by default. Finally, it also uses built in MSBUILD to satisfy the first statement.
This commit is contained in:
parent
6007edeb77
commit
c1811b3afb
2 changed files with 14 additions and 36 deletions
28
.github/workflows/build.yml
vendored
28
.github/workflows/build.yml
vendored
|
|
@ -6,35 +6,35 @@ jobs:
|
|||
build:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Download MSBuild installer
|
||||
run: powershell "$source = Get-Content -Path \"scripts\\SetupMSBuild.cs\" ; 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: Install nuget
|
||||
run: choco install nuget.commandline
|
||||
- name: OTAPI Debug
|
||||
shell: cmd
|
||||
run: |
|
||||
nuget.exe restore .\TerrariaServerAPI\TShock.4.OTAPI.sln
|
||||
".\VSBuildTools\MSBuild\Current\Bin\MSBuild.exe" .\TerrariaServerAPI\TShock.4.OTAPI.sln /p:Configuration=Debug
|
||||
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
|
||||
cd .\TerrariaServerAPI\TShock.Modifications.Bootstrapper\bin\Debug
|
||||
TShock.Modifications.Bootstrapper.exe
|
||||
- name: OTAPI Release
|
||||
shell: cmd
|
||||
run: |
|
||||
nuget.exe restore .\TerrariaServerAPI\TShock.4.OTAPI.sln
|
||||
".\VSBuildTools\MSBuild\Current\Bin\MSBuild.exe" .\TerrariaServerAPI\TShock.4.OTAPI.sln /p:Configuration=Release
|
||||
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
|
||||
shell: cmd
|
||||
run: |
|
||||
cd .\TerrariaServerAPI
|
||||
"..\VSBuildTools\MSBuild\Current\Bin\MSBuild.exe" .\TerrariaServerAPI\TerrariaServerAPI.csproj /p:Configuration=Release
|
||||
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TerrariaServerAPI\TerrariaServerAPI.csproj /p:Configuration=Release
|
||||
- name: TShock
|
||||
shell: cmd
|
||||
run: |
|
||||
nuget.exe restore TShock.sln
|
||||
".\VSBuildTools\MSBuild\Current\Bin\MSBuild.exe" .\TShockAPI\TShockAPI.csproj /p:Configuration=Release
|
||||
nuget restore TShock.sln
|
||||
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TShockAPI\TShockAPI.csproj /p:Configuration=Release
|
||||
- uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: TShockRelease
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue