Skip to content

Commit 2fbb47c

Browse files
authored
Replace autobuild for codeql (#467)
1 parent fcb2582 commit 2fbb47c

File tree

1 file changed

+16
-31
lines changed

1 file changed

+16
-31
lines changed

.github/workflows/codeql-analysis.yml

+16-31
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
1-
# For most projects, this workflow file will not need changing; you simply need
2-
# to commit it to your repository.
3-
#
4-
# You may wish to alter this file to override the set of languages analyzed,
5-
# or to provide custom queries or build logic.
6-
#
7-
# ******** NOTE ********
8-
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
10-
# supported CodeQL languages.
11-
#
1+
# https://codeql.github.com/
2+
# https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/
123
name: "CodeQL"
134

145
on:
156
push:
167
branches: [ main, live ]
178
pull_request:
18-
# The branches below must be a subset of the branches above
199
branches: [ main ]
2010
schedule:
2111
- cron: '30 13 * * 2'
@@ -33,39 +23,34 @@ jobs:
3323
fail-fast: false
3424
matrix:
3525
language: [ 'csharp', 'javascript' ]
36-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37-
# Learn more:
38-
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
3926

4027
steps:
4128
- name: Checkout repository
4229
uses: actions/checkout@main
4330

44-
# Initializes the CodeQL tools for scanning.
4531
- name: Initialize CodeQL
4632
uses: github/codeql-action/init@main
4733
with:
4834
languages: ${{ matrix.language }}
49-
# If you wish to specify custom queries, you can do so here or in a config file.
50-
# By default, queries listed here will override any specified in a config file.
51-
# Prefix the list here with "+" to use these queries and those in the config file.
52-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5335

54-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55-
# If this step fails, then you should remove it and run the build manually (see below)
56-
- name: Autobuild
36+
- name: Build JavaScript
37+
if: ${{ matrix.language == 'javascript' }}
5738
uses: github/codeql-action/autobuild@main
5839

59-
# ℹ️ Command-line programs to run using the OS shell.
60-
# 📚 https://git.io/JvXDl
40+
- name: Setup .NET
41+
if: ${{ matrix.language == 'csharp' }}
42+
uses: actions/setup-dotnet@main
43+
with:
44+
dotnet-version: 9.0.x
6145

62-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63-
# and modify them (or add more) to build your code if your project
64-
# uses a compiled language
46+
- name: Install dependencies
47+
if: ${{ matrix.language == 'csharp' }}
48+
run: dotnet restore
6549

66-
#- run: |
67-
# make bootstrap
68-
# make release
50+
- name: Build .NET
51+
if: ${{ matrix.language == 'csharp' }}
52+
run: |
53+
dotnet build --configuration Release --no-restore
6954
7055
- name: Perform CodeQL Analysis
7156
uses: github/codeql-action/analyze@v3

0 commit comments

Comments
 (0)