From 09efdf938af3f75d9b0bd72e8529977a8bfb4d42 Mon Sep 17 00:00:00 2001 From: Somebody Date: Thu, 2 May 2024 22:25:39 +0800 Subject: [PATCH] improve github actions --- .github/workflows/dotnet.yml | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index d7b7eb31..1320e29b 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -20,17 +20,41 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Setup .NET uses: actions/setup-dotnet@v3 with: dotnet-version: 8.0.x + - name: Restore dependencies run: dotnet restore - - name: Build - run: dotnet build --no-restore --configuration Release - - name: Upload a Build Artifact + + - name: Publish win-x64 + run: dotnet --no-restore publish -o Release\win-x64 -r win-x64 --framework net8.0 -p:PublishSingleFile=true + + - name: Publish linux-x64 + run: dotnet --no-restore publish -o Release\linux-x64 -r linux-x64 --framework net8.0 -p:PublishSingleFile=true + + - name: Publish linux-arm64 + run: dotnet --no-restore publish -o Release\linux-arm64 -r linux-arm64 --framework net8.0 -p:PublishSingleFile=true + + - name: Upload win-x64 Build Artifact uses: actions/upload-artifact@v4.3.1 with: - name: DanhengServer - path: GameServer/bin/Release/net8.0/ + name: DanhengServer-win-64 + path: Release\win-x64 + + - name: Upload linux-x64 Build Artifact + uses: actions/upload-artifact@v4.3.1 + with: + name: DanhengServer-linux-x64 + path: Release\linux-x64 + + - name: Upload linux-arm64 Build Artifact + uses: actions/upload-artifact@v4.3.1 + with: + name: DanhengServer-linux-arm64 + path: Release\linux-arm64 + +