Skip to content

Commit f4a607a

Browse files
authored
Update CodeQL workflow for C# analysis
1 parent 3de1669 commit f4a607a

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "CodeQL Advanced"
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
analyze:
7+
name: Analyze (${{ matrix.language }})
8+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
9+
permissions:
10+
security-events: write
11+
packages: read
12+
actions: read
13+
contents: read
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
language: [ 'csharp' ]
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Setup .NET
25+
if: matrix.language == 'csharp'
26+
uses: actions/setup-dotnet@v3
27+
with:
28+
dotnet-version: '10.0.x'
29+
30+
- name: Initialize CodeQL
31+
uses: github/codeql-action/init@v3
32+
with:
33+
languages: ${{ matrix.language }}
34+
queries: +security-extended,security-and-quality
35+
36+
- name: Build Project
37+
run: dotnet build ./src/PromptPlus.csproj -c Release
38+
39+
- name: Perform CodeQL Analysis
40+
uses: github/codeql-action/analyze@v3
41+
with:
42+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)