RAGECOOP-V/.github/workflows/nightly-build.yaml

39 lines
1.1 KiB
YAML
Raw Normal View History

2022-06-06 17:53:03 +08:00
name: Nightly-build
2022-06-06 17:49:54 +08:00
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
2022-06-06 18:32:02 +08:00
runs-on: windows-latest
2022-06-06 17:49:54 +08:00
strategy:
matrix:
2022-06-06 17:53:03 +08:00
dotnet-version: ['6.0.x']
2022-06-06 17:49:54 +08:00
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
2022-06-06 20:34:05 +08:00
- name: Build client
2022-06-07 08:31:25 +08:00
run: dotnet build RageCoop.Client/RageCoop.Client.csproj --no-restore --configuration Release -o RageCoop.Client/bin/RageCoop
2022-06-06 20:34:05 +08:00
- name: Build server win-x64
2022-06-07 08:23:16 +08:00
run: dotnet publish RageCoop.Server/RageCoop.Server.csproj --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:PublishTrimmed=true -r win-x64 -o RageCoop.Server/bin/Release/net6.0/publish/win-x64
2022-06-06 20:07:57 +08:00
- uses: actions/upload-artifact@v3
with:
2022-06-06 20:34:05 +08:00
name: RageCoop.Client
2022-06-07 08:31:25 +08:00
path: RageCoop.Client/bin
2022-06-06 20:34:05 +08:00
- uses: actions/upload-artifact@v3
with:
name: RageCoop.Server-win-x64
2022-06-07 08:23:16 +08:00
path: RageCoop.Server/bin/Release/net6.0/publish/win-x64
2022-06-06 20:07:57 +08:00
- uses: actions/checkout@v2