File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build .NET Windows App
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ pull_request :
7+ branches : [ "main" ]
8+
9+ jobs :
10+ build :
11+ name : Build on Windows
12+ runs-on : windows-latest
13+
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v3
17+
18+ - name : Setup .NET SDK
19+ uses : actions/setup-dotnet@v4
20+ with :
21+ dotnet-version : ' 8.0.x'
22+
23+ - name : Restore dependencies
24+ run : dotnet restore
25+
26+ - name : Build project
27+ run : dotnet build --no-restore --configuration Release
28+
29+ - name : Run unit tests (if any)
30+ run : dotnet test --no-build --configuration Release
31+ continue-on-error : true # Optional: allow workflow to continue even if tests fail
32+
33+ - name : Publish (portable exe)
34+ run : dotnet publish -c Release -r win-x64 --self-contained false -p:PublishSingleFile=true -o publish
35+
36+ - name : Upload published app
37+ uses : actions/upload-artifact@v4
38+ with :
39+ name : PublishedApp
40+ path : publish
You can’t perform that action at this time.
0 commit comments