diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 444e926d..f53432f9 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -42,9 +42,11 @@ jobs: strategy: fail-fast: false matrix: + solution: + - ./Pkmds.sln include: - language: csharp - build-mode: autobuild + build-mode: manual - language: javascript-typescript build-mode: none # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' @@ -59,6 +61,15 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + # sets up .NET SDK + - name: Setup .NET Core SDK + uses: actions/setup-dotnet@v4.0.0 + with: + global-json-file: ./global.json + + - name: Install WASM workload + run: dotnet workload install wasm-tools + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3 @@ -78,15 +89,13 @@ jobs: # to build your code. # ℹī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - if: matrix.build-mode == 'manual' - shell: bash - run: | - echo 'If you are using a "manual" build mode for one or more of the' \ - 'languages you are analyzing, replace this with the commands to build' \ - 'your code, for example:' - echo ' make bootstrap' - echo ' make release' - exit 1 + - name: Dotnet Restore + if: matrix.build-mode == 'manual' && matrix.language == 'csharp' + run: dotnet restore ${{ matrix.solution }} + + - name: Dotnet Build + if: matrix.build-mode == 'manual' && matrix.language == 'csharp' + run: dotnet build ${{ matrix.solution }} - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d3cbf344..462e130a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: - name: Setup .NET Core SDK uses: actions/setup-dotnet@v4.0.0 with: - dotnet-version: "8.x" + global-json-file: ./global.json - name: Install WASM workload run: dotnet workload install wasm-tools