Skip to content

Commit 25f657c

Browse files
committed
Add build workflow file
1 parent ebba7ff commit 25f657c

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/build.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: build
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ "master" ]
7+
pull_request:
8+
9+
jobs:
10+
11+
build:
12+
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
17+
runs-on: windows-latest
18+
19+
env:
20+
Solution_Path: ContextMenuManager.sln
21+
22+
steps:
23+
24+
# Checkout codes
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
# Install the .NET Core workload
29+
- name: Setup .NET
30+
uses: actions/setup-dotnet@v4
31+
with:
32+
dotnet-version: |
33+
9.0.x
34+
35+
# Restore dependencies for entire solution
36+
- name: Restore dependencies
37+
run: dotnet restore ${{ env.Solution_Path }}
38+
39+
# Build the entire solution
40+
- name: Build
41+
run: dotnet build ${{ env.Solution_Path }} --configuration Release
42+
43+
# Execute all unit tests in the solution
44+
- name: Execute unit tests
45+
run: dotnet test ${{ env.Solution_Path }} --configuration Release --no-build
46+
47+
# Upload the Build package
48+
- name: Upload Build package
49+
uses: actions/upload-artifact@v4
50+
with:
51+
path: |
52+
ContextMenuManager/bin/Publish
53+
compression-level: 0

0 commit comments

Comments
 (0)