We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a9bf6d commit 15f53d9Copy full SHA for 15f53d9
1 file changed
.github/workflows/codeql.yml
@@ -53,8 +53,16 @@ jobs:
53
- name: Build the C# project
54
if: matrix.language == 'csharp'
55
run: |
56
- dotnet restore
57
- dotnet build --configuration Release
+ # Find the solution or project file and build it
+ solution_file=$(find . -name "*.sln" -print -quit)
58
+ if [ -z "$solution_file" ]; then
59
+ project_file=$(find . -name "*.csproj" -print -quit)
60
+ dotnet restore $project_file
61
+ dotnet build --configuration Release $project_file
62
+ else
63
+ dotnet restore $solution_file
64
+ dotnet build --configuration Release $solution_file
65
+ fi
66
67
- name: Perform CodeQL Analysis
68
uses: github/codeql-action/analyze@v2
0 commit comments