@@ -12,74 +12,51 @@ jobs:
1212 strategy :
1313 matrix :
1414 os : [ubuntu-latest, windows-latest]
15-
15+
1616 steps :
1717 - name : Checkout
1818 uses : actions/checkout@v4
19-
20- - name : Setup .NET 9
19+
20+ - name : Setup .NET 9
2121 uses : actions/setup-dotnet@v4
2222 with :
2323 dotnet-version : 9.0.x
24-
25- # Install MAUI workload only on Windows
26- - name : Install MAUI workload (Windows only)
27- if : runner.os == 'Windows'
28- run : dotnet workload install maui
29-
30- # Restore
24+
25+ - name : Install .NET workloads
26+ run : dotnet workload install aspire wasm-tools
27+
3128 - name : Restore
3229 run : dotnet restore
33-
34- # Windows-only: Build desktop
35- - name : Build desktop (Windows)
36- if : runner.os == 'Windows'
37- run : dotnet build src/Trion.Desktop/Trion.Desktop.csproj -c Release -f net9.0-windows10.0.19041.0 --no-restore --warnaserror
38-
39- # Build web (both OS)
40- - name : Build web
41- run : dotnet build src/Trion.Web/Trion.Web.csproj -c Release --no-restore --warnaserror
42-
43- # Run tests (both OS)
30+
31+ - name : Build
32+ run : dotnet build -c Release --no-restore --warnaserror
33+
4434 - name : Test
4535 run : dotnet test -c Release --no-build --logger trx --collect:"XPlat Code Coverage"
46-
47- # Windows-only: Publish desktop
36+
4837 - name : Publish desktop (Windows)
49- if : runner.os == 'Windows'
50- run : dotnet publish src/Trion.Desktop/Trion.Desktop.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o artifacts/desktop-win -f net9.0-windows10.0.19041.0
51-
52- # Publish web (both OS)
53- - name : Publish web
38+ if : matrix.os == 'windows-latest'
39+ run : dotnet publish src/Trion.Desktop/Trion.Desktop.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -o artifacts/desktop
40+
41+ - name : Publish web (portable)
5442 run : dotnet publish src/Trion.Web/Trion.Web.csproj -c Release -o artifacts/web
55-
56- # Always upload test results (both OS)
43+
5744 - name : Upload test results
5845 if : always()
5946 uses : actions/upload-artifact@v4
6047 with :
6148 name : test-results-${{ matrix.os }}
6249 path : ' **/*.trx'
63-
64- # Upload coverage (only from Linux)
50+
6551 - name : Upload coverage
6652 if : matrix.os == 'ubuntu-latest'
6753 uses : codecov/codecov-action@v4
6854 with :
6955 token : ${{ secrets.CODECOV_TOKEN }}
7056 files : ' **/coverage.cobertura.xml'
71-
72- # Upload Windows desktop artifact
73- - name : Upload desktop artifact (Windows)
74- if : runner.os == 'Windows'
75- uses : actions/upload-artifact@v4
76- with :
77- name : Trion-Desktop-Win
78- path : artifacts/desktop-win/
79-
80- # Upload web artifact (both OS)
81- - name : Upload web artifact
57+
58+ - name : Upload build artifacts
8259 uses : actions/upload-artifact@v4
8360 with :
84- name : Trion-Web -${{ matrix.os }}
85- path : artifacts/web/
61+ name : Trion-Build -${{ matrix.os }}
62+ path : artifacts/
0 commit comments