Skip to content

Commit 222b11c

Browse files
committed
Update workflow
1 parent 033c7d8 commit 222b11c

File tree

1 file changed

+9
-26
lines changed

1 file changed

+9
-26
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,50 +9,33 @@ on:
99
jobs:
1010

1111
build:
12-
13-
permissions:
14-
contents: write
15-
pull-requests: write
16-
1712
runs-on: windows-latest
18-
13+
1914
env:
2015
Solution_Path: ContextMenuManager.sln
2116
Project_Path: ContextMenuManager\ContextMenuManager.csproj
2217

2318
steps:
24-
2519
# Checkout codes
2620
- name: Checkout
2721
uses: actions/checkout@v5
2822

29-
# Install the .NET Core workload
30-
# - name: Setup .NET
31-
# uses: actions/setup-dotnet@v4
32-
# with:
33-
# dotnet-version: |
34-
# 9.0.x
35-
36-
# Restore dependencies for entire solution
23+
# Restore NuGet packages (for .NET Framework projects)
3724
- name: Restore dependencies
38-
run: msbuild restore ${{ env.Solution_Path }}
25+
run: nuget restore ${{ env.Solution_Path }}
3926

40-
# Build the entire solution
27+
# Build the solution with MSBuild
4128
- name: Build
4229
run: msbuild ${{ env.Solution_Path }} /p:Configuration=Release
4330

44-
# Execute all unit tests in the solution
45-
- name: Execute unit tests
46-
run: msbuild ${{ env.Solution_Path }} /p:Configuration=Release /t:Test
47-
48-
# Run the build task
49-
- name: Run build task
50-
run: msbuild ${{ env.Project_Path }} /p:Configuration=Release
31+
# (Optional) Run tests if you have MSTest/NUnit/xUnit for .NET Framework
32+
# - name: Execute unit tests
33+
# run: vstest.console.exe "**\bin\Release\*test*.dll"
5134

52-
# Upload the Build package
35+
# Upload build artifact
5336
- name: Upload Build package
5437
uses: actions/upload-artifact@v4
5538
with:
5639
path: |
57-
ContextMenuManager/bin/Release/ContextMenuManager.exe
40+
ContextMenuManager\bin\Release\ContextMenuManager.exe
5841
compression-level: 0

0 commit comments

Comments
 (0)