Skip to content

Commit 1a9bf6d

Browse files
dot net version changes
1 parent 3251a16 commit 1a9bf6d

File tree

1 file changed

+40
-18
lines changed

1 file changed

+40
-18
lines changed

.github/workflows/codeql.yml

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,62 @@
1-
name: CodeQL
1+
name: "CodeQL"
22

33
on:
44
push:
5-
branches:
6-
- main # Specify your target branch for analysis (main or master)
5+
branches: [ "main" ]
76
pull_request:
8-
branches:
9-
- main
7+
branches: [ "main" ]
108

119
jobs:
12-
analysis:
13-
runs-on: ubuntu-latest # You can also use other OS types, like 'windows-latest' or 'macos-latest'
10+
analyze:
11+
name: Analyze
12+
runs-on: ${{ matrix.language == 'swift' && 'macos-latest' || 'ubuntu-latest' }}
13+
timeout-minutes: ${{ matrix.language == 'swift' && 120 || 360 }}
14+
permissions:
15+
actions: read
16+
contents: read
17+
security-events: write
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
language: [ 'csharp', 'javascript-typescript' ]
23+
dot-version: ['8.0']
1424

1525
steps:
16-
- name: Checkout code
26+
- name: Checkout repository
1727
uses: actions/checkout@v3
1828

19-
- name: Set up .NET SDK
20-
uses: actions/setup-dotnet@v3
21-
with:
22-
dotnet-version: '6.0' # Specify the version of .NET Core you are using
29+
- name: Install libssl-dev
30+
run: sudo apt-get install -y libssl-dev
2331

2432
- name: Install dependencies
2533
run: |
26-
dotnet restore # Restore the NuGet packages
34+
sudo apt-get update
35+
sudo apt-get install -y libicu-dev libssl-dev ca-certificates openssl
2736
28-
- name: Build project
29-
run: |
30-
dotnet build --configuration Release --no-restore # Build the project without restoring dependencies again
37+
- name: Set System.Globalization.Invariant to true
38+
run: echo "DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1" >> $GITHUB_ENV
39+
40+
- name: Setup dotnet ${{ matrix.dot-version }}
41+
uses: actions/setup-dotnet@v3
42+
with:
43+
dotnet-version: ${{ matrix.dot-version }}
44+
45+
- name: Display dotnet version
46+
run: dotnet --version
3147

3248
- name: Initialize CodeQL
3349
uses: github/codeql-action/init@v2
3450
with:
35-
languages: 'csharp' # Specify 'csharp' for .NET Core
51+
languages: ${{ matrix.language }}
52+
53+
- name: Build the C# project
54+
if: matrix.language == 'csharp'
55+
run: |
56+
dotnet restore
57+
dotnet build --configuration Release
3658
3759
- name: Perform CodeQL Analysis
3860
uses: github/codeql-action/analyze@v2
3961
with:
40-
category: 'security'
62+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)