Merge branch 'main' of https://github.com/JsonViewer-Component/Blazor #16
This file contains hidden or 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 Security Analysis | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| schedule: | |
| - cron: '0 0 * * 1' # Every Monday at midnight | |
| workflow_dispatch: | |
| jobs: | |
| analyze: | |
| name: 🔍 Analyze ${{ matrix.language }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| packages: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| language: [ 'csharp', 'javascript' ] | |
| steps: | |
| # ======================================== | |
| # 1️⃣ Checkout Repository | |
| # ======================================== | |
| - name: 📥 Checkout repository | |
| uses: actions/checkout@v4 | |
| # ======================================== | |
| # 2️⃣ Setup .NET (فقط برای C#) | |
| # ======================================== | |
| - name: 🔧 Setup .NET | |
| if: matrix.language == 'csharp' | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '7.0.x' | |
| # ======================================== | |
| # 3️⃣ Initialize CodeQL | |
| # ======================================== | |
| - name: ⚙️ Initialize CodeQL | |
| uses: github/codeql-action/init@v3 | |
| with: | |
| languages: ${{ matrix.language }} | |
| queries: security-extended,security-and-quality | |
| # ======================================== | |
| # 4️⃣ Build Project (Manual - فقط برای C#) | |
| # ======================================== | |
| - name: 🏗️ Build C# Projects | |
| if: matrix.language == 'csharp' | |
| run: | | |
| echo "📦 Restoring dependencies..." | |
| dotnet restore JsonViewer.Blazor.sln | |
| echo "🏗️ Building Component..." | |
| dotnet build src/Component/Component.csproj -c Release --no-restore | |
| echo "🏗️ Building Demo..." | |
| dotnet build src/Blazor.Demo/Blazor.Demo.csproj -c Release --no-restore | |
| echo "✅ Build completed" | |
| # ======================================== | |
| # 5️⃣ Autobuild (فقط برای JavaScript) | |
| # ======================================== | |
| - name: 🏗️ Autobuild JavaScript | |
| if: matrix.language == 'javascript' | |
| uses: github/codeql-action/autobuild@v3 | |
| # ======================================== | |
| # 6️⃣ Perform CodeQL Analysis | |
| # ======================================== | |
| - name: 🔍 Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v3 | |
| with: | |
| category: "/language:${{ matrix.language }}" |