CodeQL #80
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CodeQL | |
on: | |
push: | |
branches: [main, develop] | |
pull_request: | |
branches: [main, develop] | |
schedule: | |
- cron: "42 8 * * 1" | |
workflow_dispatch: | |
jobs: | |
analyze: | |
strategy: | |
fail-fast: false | |
matrix: | |
language: ["csharp"] | |
configuration: [Release] | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
env: | |
Solution_Name: source/BulkCrapUninstaller.sln | |
Test_Project_Path: source/BulkCrapUninstallerTests/BulkCrapUninstallerTests.csproj | |
runs-on: "windows-latest" | |
timeout-minutes: 120 | |
name: Analyze | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
# Initializes the CodeQL tools for scanning. | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: ${{ matrix.language }} | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | |
- name: Setup MSBuild.exe | |
uses: microsoft/setup-msbuild@v2 | |
# Restore the application to populate the obj folder with RuntimeIdentifiers | |
- name: Restore the application | |
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration | |
env: | |
Configuration: ${{ matrix.configuration }} | |
# Restore the application to populate the obj folder with RuntimeIdentifiers | |
- name: Build | |
run: msbuild $env:Solution_Name /p:Configuration=$env:Configuration | |
env: | |
Configuration: ${{ matrix.configuration }} | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |
with: | |
category: "/language:${{matrix.language}}" |