name: CodeQL Analysis

on:
  push:
  pull_request:
  workflow_dispatch:
  schedule:
    - cron: '0 8 * * *'

jobs:
  analyze:
    name: codeql-analysis
    runs-on: windows-latest
    steps:
      # Due to the insufficient memory allocated by default, CodeQL sometimes requires more to be manually allocated
      - name: Configure Pagefile
        id: config_pagefile
        uses: al-cheb/configure-pagefile-action@v1.2
        with:
            minimum-size: 8GB
            maximum-size: 32GB
            disk-root: "D:"

      - name: Checkout repository
        id: checkout_repo
        uses: actions/checkout@v2.4.0

      - name: Initialize CodeQL
        id: init_codeql
        uses: github/codeql-action/init@v1
        with:
          queries: security-and-quality

      - name: Build project
        id: build_project
        shell: pwsh
        run: |
          dotnet build ./src/RestSharp/RestSharp.csproj -c Release

      - name: Perform CodeQL Analysis
        id: analyze_codeql
        uses: github/codeql-action/analyze@v1

# Built with ❤ by [Pipeline Foundation](https://pipeline.foundation)
name: CodeQL Analysis

on:
  push:
  pull_request:
  workflow_dispatch:
  schedule:
    - cron: '0 8 * * *'

jobs:
  analyze:
    name: codeql-analysis
    runs-on: windows-latest
    steps:
      # Due to the insufficient memory allocated by default, CodeQL sometimes requires more to be manually allocated
      -
        name: Configure Pagefile
        id: config_pagefile
        uses: al-cheb/configure-pagefile-action@v1.2
        with:
            minimum-size: 8GB
            maximum-size: 32GB
            disk-root: "D:"
      -
        name: Checkout repository
        id: checkout_repo
        uses: actions/checkout@v2.4.0
      -
        name: Setup .NET
        uses: actions/setup-dotnet@v1.9.0
        with:
          dotnet-version: '6.0'
      -
        name: Initialize CodeQL
        id: init_codeql
        uses: github/codeql-action/init@v1
        with:
          queries: security-and-quality
      -  
        name: Build project
        id: build_project
        shell: pwsh
        run: |
          dotnet build ./src/RestSharp/RestSharp.csproj -c Release
      -  
        name: Perform CodeQL Analysis
        id: analyze_codeql
        uses: github/codeql-action/analyze@v1

# Built with ❤ by [Pipeline Foundation](https://pipeline.foundation)
Update CodeQL to use .NET 6
Update CodeQL to use .NET 6
