Skip to content

Commit e25a344

Browse files
authored
Create buildexe.yml
1 parent ec8f8b5 commit e25a344

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/buildexe.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build Stability Matrix (Windows)
2+
3+
on:
4+
push:
5+
branches: [ "clean-main" ]
6+
pull_request:
7+
branches: [ "clean-main" ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build-windows:
12+
runs-on: windows-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Setup .NET SDK 9.x
19+
uses: actions/setup-dotnet@v4
20+
with:
21+
dotnet-version: '9.0.x'
22+
23+
- name: Restore Avalonia project
24+
run: dotnet restore StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj
25+
26+
- name: Restore Tests project
27+
run: dotnet restore StabilityMatrix.Tests/StabilityMatrix.Tests.csproj
28+
29+
- name: Build Avalonia project
30+
run: dotnet build StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj -c Release --no-restore --no-cache
31+
32+
- name: Build Tests project
33+
run: dotnet build StabilityMatrix.Tests/StabilityMatrix.Tests.csproj -c Release --no-restore
34+
35+
- name: Run Tests
36+
run: dotnet test StabilityMatrix.Tests/StabilityMatrix.Tests.csproj -c Release --no-build
37+
38+
- name: Publish Avalonia app (win10-x64)
39+
run: dotnet publish StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/win10-x64
40+
41+
- name: Upload Artifact
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: StabilityMatrix-win10-x64
45+
path: ./publish/win10-x64/*
46+
compression-level: 6
47+
retention-days: 14

0 commit comments

Comments
 (0)