diff --git a/.github/workflows/alpha-notes.md b/.github/workflows/alpha-notes.md index 14edb45e..f8ec5c59 100644 --- a/.github/workflows/alpha-notes.md +++ b/.github/workflows/alpha-notes.md @@ -14,16 +14,19 @@ * You should have a `Multiplayer` folder in the `Mods` folder (`Mods/Multiplayer`) * Make sure you do not have this directory structure: `Mods/Multiplayer-beta/Multiplayer`. If you do, move the `Multiplayer` folder to the parent directory. ---- - #### Standalone server Download `Server-beta.zip` if you want to host a dedicated standalone server for testing. **Setup** 1. Download and extract `Server-beta.zip`. -2. Run `Server.exe` (Windows) or `dotnet Server.dll` (Linux/Mac) from the extracted folder. -3. The server will start and wait for the first connection. +2. Open the folder for your platform: + - `Server/Windows` + - `Server/Linux` +3. Start the server using: + - Windows: `Server.exe` + - Linux: `./Server.sh` +4. The server will start and wait for the first connection. **First-time configuration (bootstrap)** No manual configuration files are required. diff --git a/.github/workflows/build-beta.yml b/.github/workflows/build-beta.yml index 548bd841..d4e2db16 100644 --- a/.github/workflows/build-beta.yml +++ b/.github/workflows/build-beta.yml @@ -34,8 +34,22 @@ jobs: - name: Build Mod run: dotnet build ${{ env.SLN_PATH }} --configuration Release --no-restore - - name: Publish Server - run: dotnet publish ${{ env.SLN_PATH }}Server/Server.csproj --configuration Release --no-restore --no-build -o output/Server + - name: Publish Server (Windows) + run: dotnet publish ${{ env.SLN_PATH }}Server/Server.csproj --configuration Release --runtime win-x64 --self-contained false -p:UseAppHost=true -o output/Server/Windows + + - name: Publish Server (Linux) + run: dotnet publish ${{ env.SLN_PATH }}Server/Server.csproj --configuration Release --runtime linux-x64 --self-contained false -p:UseAppHost=true -o output/Server/Linux + + - name: Add Server Launchers + run: | + cat > output/Server/Linux/Server.sh <<'EOF' + #!/usr/bin/env bash + set -euo pipefail + SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" + exec dotnet "$SCRIPT_DIR/Server.dll" "$@" + EOF + + chmod +x output/Server/Linux/Server.sh - name: Package files run: |