Skip to content

Commit 8751144

Browse files
Copilottrackd
andcommitted
Add CodeQL workflow and fix C# language version
Co-authored-by: trackd <17672644+trackd@users.noreply.github.com>
1 parent 9591094 commit 8751144

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed

.github/workflows/codeql.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: '15 5 * * 2'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
15+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
16+
permissions:
17+
# required for all workflows
18+
security-events: write
19+
# only required for workflows in private repositories
20+
actions: read
21+
contents: read
22+
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
language: [ 'csharp', 'powershell' ]
27+
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v4
31+
32+
- name: Initialize CodeQL
33+
uses: github/codeql-action/init@v3
34+
with:
35+
languages: ${{ matrix.language }}
36+
queries: security-extended,security-and-quality
37+
38+
- name: Setup .NET
39+
if: matrix.language == 'csharp'
40+
uses: actions/setup-dotnet@v4
41+
with:
42+
dotnet-version: '8.0.x'
43+
44+
- name: Setup PowerShell
45+
if: matrix.language == 'powershell'
46+
shell: pwsh
47+
run: |
48+
Write-Host "PowerShell version: $($PSVersionTable.PSVersion)"
49+
50+
- name: Autobuild
51+
uses: github/codeql-action/autobuild@v3
52+
53+
- name: Perform CodeQL Analysis
54+
uses: github/codeql-action/analyze@v3
55+
with:
56+
category: "/language:${{matrix.language}}"

src/Sixel/Sixel.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
8-
<LangVersion>13.0</LangVersion>
8+
<LangVersion>12.0</LangVersion>
99
<Version>0.5.0</Version>
1010
<AnalysisMode>Recommended</AnalysisMode>
1111
<EnableNETAnalyzers>true</EnableNETAnalyzers>

0 commit comments

Comments
 (0)