Skip to content

Commit

Permalink
Add workflow for easy to use servers. (#500)
Browse files Browse the repository at this point in the history
  • Loading branch information
dffdff2423 authored Dec 14, 2024
1 parent 0b776fa commit bfbd134
Showing 1 changed file with 84 additions and 0 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/cd-build-upload-artifact.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Action to create easy to use servers for players to test things without compiling the entire repo

name: Create server bundle

concurrency:
group: publish

on:
push:
branches: [ master, staging, trying ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Install dependencies
run: sudo apt-get install -y python3-paramiko python3-lxml

- uses: actions/checkout@v3.6.0
with:
submodules: 'recursive'
- name: Setup .NET Core
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: 8.0.x

- name: Get Engine Tag
run: |
cd RobustToolbox
git fetch --depth=1
- name: Install dependencies
run: dotnet restore

- name: Build Packaging
run: dotnet build Content.Packaging --configuration Release --no-restore /m

- name: Package server
run: dotnet run --project Content.Packaging server --platform win-x64 --platform linux-x64 --platform osx-x64

- name: Package client
run: dotnet run --project Content.Packaging client --no-wipe-release

- name: Bundle client
run: |
pushd release
mkdir linux
mv SS14.Server_linux-x64.zip linux
pushd linux
unzip SS14.Server_linux-x64.zip
rm SS14.Server_linux-x64.zip
cp ../SS14.Client.zip Content.Client.zip
popd
mkdir osx
mv SS14.Server_osx-x64.zip osx
pushd osx
unzip SS14.Server_osx-x64.zip
rm SS14.Server_osx-x64.zip
cp ../SS14.Client.zip Content.Client.zip
popd
mkdir win
mv SS14.Server_win-x64.zip win
pushd win
unzip SS14.Server_win-x64.zip
rm SS14.Server_win-x64.zip
cp ../SS14.Client.zip Content.Client.zip
popd
popd
- uses: actions/upload-artifact@v4
with:
name: Cosmatic.ServerBundle-linux-x64.zip
path: release/linux

- uses: actions/upload-artifact@v4
with:
name: Cosmatic.ServerBundle-osx-x64.zip
path: release/osx

- uses: actions/upload-artifact@v4
with:
name: Cosmatic.ServerBundle-windows-x64.zip
path: release/win

0 comments on commit bfbd134

Please sign in to comment.