Add build test action

This commit is contained in:
Sardelka9515
2022-09-08 20:05:26 -07:00
committed by GitHub
parent f28c83ccbd
commit 6e8f6e78f6
2 changed files with 48 additions and 1 deletions

47
.github/workflows/build-test.yaml vendored Normal file
View File

@ -0,0 +1,47 @@
name: Buld test
on:
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
- '!main' # excludes main
pull_request:
branches: [ "main","dev-nightly" ]
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: Restore nuget packages
run: nuget restore
- name: Build client and installer
run: dotnet build RageCoop.Client.Installer/RageCoop.Client.Installer.csproj --configuration Release -o bin/Release/Client/RageCoop
- name: Build server win-x64
run: dotnet build RageCoop.Server/RageCoop.Server.csproj -o bin/Release/Server
- name: Upload server
- uses: actions/upload-artifact@v3
with:
name: RageCoop.Server
path: bin/Release/Server
- name: Upload Client
- uses: actions/upload-artifact@v3
with:
name: RageCoop.Client
path: bin/Release/Client/RageCoop
- uses: actions/checkout@v2

View File

@ -21,7 +21,7 @@ jobs:
- name: Restore dependencies - name: Restore dependencies
run: dotnet restore run: dotnet restore
- name: Restore nuget packages - name: Restore nuget packages
run: nuget restore run: nuget restore`
- name: Build client and installer - name: Build client and installer
run: dotnet build RageCoop.Client.Installer/RageCoop.Client.Installer.csproj --configuration Release -o bin/Release/Client/RageCoop run: dotnet build RageCoop.Client.Installer/RageCoop.Client.Installer.csproj --configuration Release -o bin/Release/Client/RageCoop
- name: Build server win-x64 - name: Build server win-x64