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

54 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2022-09-08 20:09:52 -07:00
name: Build test
2022-09-08 20:05:26 -07:00
on:
push:
branches:
2022-09-08 20:05:26 -07:00
- '**' # matches every branch
- '!main' # excludes main
2022-09-09 11:15:27 +08:00
- '!dev-nightly' # excludes nightly
2022-09-08 20:05:26 -07:00
pull_request:
2022-09-08 20:09:52 -07:00
branches: [ "main", "dev-nightly" ]
2022-09-08 20:05:26 -07:00
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
2022-11-19 12:05:21 +08:00
dotnet-version: ['7.0.x']
2022-09-08 20:05:26 -07:00
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Initialise submodules
run: git submodule update --init
2022-09-08 20:05:26 -07:00
- name: Restore dependencies
run: dotnet restore
2022-09-08 20:05:26 -07:00
- name: Restore nuget packages
run: nuget restore
- name: Build
2022-11-05 18:43:59 +08:00
run: .\build.cmd
2022-09-08 20:05:26 -07:00
- name: Upload server
2022-09-08 20:09:52 -07:00
uses: actions/upload-artifact@v3
2022-09-08 20:05:26 -07:00
with:
name: RageCoop.Server
path: bin/Release/Server
2022-09-08 20:05:26 -07:00
- name: Upload Client
2022-09-08 20:09:52 -07:00
uses: actions/upload-artifact@v3
2022-09-08 20:05:26 -07:00
with:
name: RageCoop.Client
2022-09-09 11:23:46 +08:00
path: bin/Release/Client
2022-09-08 20:05:26 -07:00
- uses: actions/checkout@v2
2022-09-09 11:15:27 +08:00