RAGECOOP-V/.github/workflows/nightly-build.yaml
2022-06-12 15:07:10 +08:00

51 lines
1.7 KiB
YAML

name: Nightly-build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
dotnet-version: ['6.0.x']
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore dependencies
run: dotnet restore
- name: Build client
run: dotnet build RageCoop.Client/RageCoop.Client.csproj --no-restore --configuration Release -o RageCoop.Client/bin/RageCoop
- name: Build server win-x64
run: dotnet publish RageCoop.Server/RageCoop.Server.csproj --self-contained -p:PublishSingleFile=true -p:PublishTrimmed=true -r win-x64 -o RageCoop.Server/bin/win-x64
- name: Build server linux-x64
run: dotnet publish RageCoop.Server/RageCoop.Server.csproj --self-contained -p:PublishSingleFile=true -p:PublishTrimmed=true -r linux-x64 -o RageCoop.Server/bin/linux-x64
- name: Build server linux-arm
run: dotnet publish RageCoop.Server/RageCoop.Server.csproj --self-contained -p:PublishSingleFile=true -p:PublishTrimmed=true -r linux-arm -o RageCoop.Server/bin/linux-arm
- uses: actions/upload-artifact@v3
with:
name: RageCoop.Client
path: RageCoop.Client/bin
- uses: actions/upload-artifact@v3
with:
name: RageCoop.Server-win-x64
path: RageCoop.Server/bin/win-x64
- uses: actions/upload-artifact@v3
with:
name: RageCoop.Server-linux-x64
path: RageCoop.Server/bin/linux-x64
- uses: actions/upload-artifact@v3
with:
name: RageCoop.Server-linux-arm
path: RageCoop.Server/bin/linux-arm
- uses: actions/checkout@v2