diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 5133cb2..59e0e45 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -2,70 +2,40 @@ name: "CodeQL" on: push: - branches: [ master, v3 ] + branches: [ master ] pull_request: - # The branches below must be a subset of the branches above branches: [master] - schedule: - - cron: '0 6 * * 5' jobs: analyze: name: Analyze runs-on: ubuntu-latest + permissions: + security-events: write strategy: fail-fast: false matrix: - # Override automatic language detection by changing the below list - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] - language: ['csharp'] - # Learn more... - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection + include: + - language: csharp + build-mode: autobuild steps: - name: Checkout repository uses: actions/checkout@v4 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - - name: Setup .NET 6.0 - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '6.0.x' - name: Setup .NET 8.0 uses: actions/setup-dotnet@v4 with: dotnet-version: '8.0.x' - # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release + build-mode: ${{ matrix.build-mode }} - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" \ No newline at end of file diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index 1afd7dd..60dcf75 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -2,7 +2,7 @@ name: .NET Core on: push: - branches: [ master, v2, v3 ] + branches: [ master ] pull_request: branches: [ master ] @@ -16,24 +16,25 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Setup .NET 8.0 uses: actions/setup-dotnet@v4 with: dotnet-version: '8.0.x' - - name: Fix Windows VM bug - shell: bash - if: matrix.os == 'windows-latest' - run: | - dotnet nuget locals all --clear + - name: Restore run: dotnet restore + - name: Build - run: dotnet build --configuration Release --no-restore + run: dotnet build --no-restore -c Release + - name: Test - run: dotnet test --no-restore --verbosity minimal + run: dotnet test --no-build --verbosity minimal + - name: Pack if: matrix.os == 'ubuntu-latest' - run: dotnet pack -c Release + run: dotnet pack --no-build -c Release + - name: Publish artifact if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v4