Add C# dedicated server replacement
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
name: CSharp Server Gate
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- rewrite/csharp-server
|
||||
paths:
|
||||
- "server/**/*.cs"
|
||||
- "server/**/*.csproj"
|
||||
- ".github/workflows/csharp-server.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
runs-on: [self-hosted, Linux, X64]
|
||||
defaults:
|
||||
run:
|
||||
working-directory: server
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: "8.0.x"
|
||||
|
||||
- name: Report .NET
|
||||
run: dotnet --info
|
||||
|
||||
- name: Build C# server
|
||||
run: dotnet build CommonwealthOnline.Server.csproj -c Release --nologo
|
||||
|
||||
- name: Run C# server tests
|
||||
run: dotnet run --project tests/CommonwealthOnline.Server.Tests.csproj -c Release --no-restore
|
||||
|
||||
- name: Publish Linux server
|
||||
run: dotnet publish CommonwealthOnline.Server.csproj -c Release -r linux-x64 --self-contained false -o publish/linux-x64 --nologo
|
||||
|
||||
- name: Verify published entrypoint
|
||||
run: test -f publish/linux-x64/CommonwealthOnline.Server.dll
|
||||
Reference in New Issue
Block a user