From dbad25894e18e5cfb97473a90f36c7d57c186515 Mon Sep 17 00:00:00 2001 From: Luke Date: Fri, 3 Dec 2021 08:06:07 +1000 Subject: [PATCH] Remove build.yml + try and implement chmod in otapi3 ci --- .github/workflows/build.yml | 66 --------------------------------- .github/workflows/ci-otapi3.yml | 8 +++- 2 files changed, 7 insertions(+), 67 deletions(-) delete mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 8173267b..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: Build Server - -on: [push, pull_request] - -jobs: - build: - runs-on: windows-latest - strategy: - matrix: - mode: ["Debug", "Release"] - steps: - - name: Git checkout - uses: actions/checkout@v1 - with: - submodules: recursive - - name: Install 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 - shell: cmd - run: | - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TerrariaServerAPI\TShock.4.OTAPI.sln /p:Configuration=${{ matrix.mode }} - cd .\TerrariaServerAPI\TShock.Modifications.Bootstrapper\bin\${{ matrix.mode }} - TShock.Modifications.Bootstrapper.exe - - name: Build TerrariaServerAPI - shell: cmd - run: | - cd .\TerrariaServerAPI - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TerrariaServerAPI\TerrariaServerAPI.csproj /p:Configuration=${{ matrix.mode }} - - name: Build TShock - shell: cmd - run: | - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" .\TShockAPI\TShockAPI.csproj /p:Configuration=${{ matrix.mode }} - - name: Normalize release packaging - shell: cmd - run: | - xcopy /Y prebuilts\*.* TShockAPI\bin\${{ matrix.mode }} - mkdir TShockAPI\bin\${{ matrix.mode }}\ServerPlugins - move TShockAPI\bin\${{ matrix.mode }}\TShockAPI.dll TShockAPI\bin\${{ matrix.mode }}\ServerPlugins - - name: Upload TShock (Debug) - if: contains(matrix.mode, 'Debug') - uses: actions/upload-artifact@master - with: - name: Experimental TShock (debug) - path: TShockAPI\bin\Debug - - name: Upload OTAPI Bootstrapper (Debug) - if: contains(matrix.mode, 'Debug') - uses: actions/upload-artifact@master - with: - name: Experimental (debug) OTAPI Bootstrapper - path: .\TerrariaServerAPI\TShock.Modifications.Bootstrapper\bin\Debug\TShock.Modifications.Bootstrapper.exe - - name: Upload TShock (Not Debug) - if: contains(matrix.mode, 'Release') - uses: actions/upload-artifact@master - with: - name: Experimental TShock (not debug) - path: TShockAPI\bin\Release - - name: Upload OTAPI Bootstrapper (Not Debug) - if: contains(matrix.mode, 'Release') - uses: actions/upload-artifact@master - with: - name: Experimental (not debug) OTAPI Bootstrapper - path: .\TerrariaServerAPI\TShock.Modifications.Bootstrapper\bin\Release\TShock.Modifications.Bootstrapper.exe diff --git a/.github/workflows/ci-otapi3.yml b/.github/workflows/ci-otapi3.yml index 6a8580e2..b289d56f 100644 --- a/.github/workflows/ci-otapi3.yml +++ b/.github/workflows/ci-otapi3.yml @@ -22,7 +22,7 @@ jobs: run: dotnet test build: - runs-on: windows-latest + runs-on: ubuntu-latest strategy: matrix: arch: ["win-x64", "osx-x64", "linux-x64", "linux-arm64", "linux-arm"] @@ -44,6 +44,12 @@ jobs: cd TShockLauncher dotnet publish -r ${{ matrix.arch }} -f net6.0 -c Release -p:PublishSingleFile=true --self-contained true + - name: Chmod scripts + if: ${{ matrix.arch != 'win-x64' }} + run: | + chmod +x TShockLauncher/bin/Release/net6.0/${{ matrix.arch }}/publish/TShock.sh + chmod +x TShockLauncher/bin/Release/net6.0/${{ matrix.arch }}/publish/bin/TShock.Run + - uses: actions/upload-artifact@v2 with: name: TShock-Beta-${{ matrix.arch }}-Release