-
Notifications
You must be signed in to change notification settings - Fork 57
56 lines (50 loc) · 1.92 KB
/
linux-dotnet.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Linux - .NET Core
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
# OS Supported: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-18.04, ubuntu-16.04]
dotnet: [ '3.1.x', '5.0.x' ]
name: .NET Core ${{ matrix.dotnet }}
steps:
- uses: actions/checkout@v2
- name: Setup .NET ${{ matrix.dotnet }}
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Upload a Shared Build Artifact
uses: actions/upload-artifact@v2
with:
name: Shared-Package
path: ${{github.workspace}}/src/Shared/bin/Debug/netcoreapp3.1/
- name: Upload a HGWC Build Artifact
uses: actions/upload-artifact@v2
with:
name: HGWC-Package
path: ${{github.workspace}}/src/HGWC/bin/Debug/netcoreapp3.1/
- name: Upload a Login Build Artifact
uses: actions/upload-artifact@v2
with:
name: Login-Package
path: ${{github.workspace}}/src/Login/bin/Debug/netcoreapp3.1/
- name: Upload a Game Build Artifact
uses: actions/upload-artifact@v2
with:
name: Game-Package
path: ${{github.workspace}}/src/Game/bin/Debug/netcoreapp3.1/