-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (79 loc) · 2.98 KB
/
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: .NET
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
linux-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: \8.0.x
- name: Restore dependencies
run: dotnet restore TownSuite.MultiTenant.sln
- name: Build
run: dotnet build TownSuite.MultiTenant.sln --no-restore -c Release
- name: Test
run: cwd=`pwd` && dotnet vstest "TownSuite.MultiTenant.Tests/bin/Release/net6.0/TownSuite.MultiTenant.Tests.dll" --logger:"trx;LogFileName=$cwd/TownSuite.MultiTenant.Tests/bin/Release/net6.0/nunit-result.trx"
- name: Archive test results
uses: actions/upload-artifact@v4
with:
name: test-results
path: |
TownSuite.MultiTenant.Tests/bin/Release/net6.0/nunit-result.trx
retention-days: 1
- name: Publish
run: dotnet publish TownSuite.MultiTenant.Console -c Release -r linux-x64 -p:PublishReadyToRun=true --self-contained true -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true
- name: Archive linux artifacts
uses: actions/upload-artifact@v4
with:
name: TownSuite.MultiTenant.Console-linux-x64
path: |
TownSuite.MultiTenant.Console/bin/Release/net6.0/linux-x64/publish
retention-days: 1
windows-build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore TownSuite.MultiTenant.sln
- name: Build
run: dotnet build TownSuite.MultiTenant.sln --no-restore -c Release
- name: Publish
run: dotnet publish TownSuite.MultiTenant.Console -c Release -r win-x64 -p:PublishReadyToRun=true --self-contained true -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true
- name: Archive windows artifacts
uses: actions/upload-artifact@v4
with:
name: TownSuite.MultiTenant.Console-win-x64
path: |
TownSuite.MultiTenant.Console/bin/Release/net6.0/win-x64/publish
retention-days: 1
mac-build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore TownSuite.MultiTenant.sln
- name: Build
run: dotnet build TownSuite.MultiTenant.sln --no-restore -c Release
- name: Publish
run: dotnet publish TownSuite.MultiTenant.Console -c Release -r osx-x64 -p:PublishReadyToRun=true --self-contained true -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true
- name: Archive mac artifacts
uses: actions/upload-artifact@v4
with:
name: TownSuite.MultiTenant.Console-osx-x64
path: |
TownSuite.MultiTenant.Console/bin/Release/net6.0/osx-x64/publish
retention-days: 1