diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ed0f37..c1de913 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: pull-requests: write steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: fetch-depth: 0 @@ -109,7 +109,7 @@ jobs: packages: write steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: fetch-depth: 0 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9762274..5447ded 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,46 +1,46 @@ -name: CodeQL - -on: - push: - branches: [main] - pull_request: - branches: [main] - schedule: - - cron: '0 12 * * 0' - -jobs: - analyze: - runs-on: ubuntu-latest - permissions: - security-events: write - actions: read - contents: read - steps: - - name: Checkout - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - name: Setup .NET - uses: actions/setup-dotnet@v5 - with: - dotnet-version: | - 8.0.x - 10.0.x - - - name: Initialize CodeQL - uses: github/codeql-action/init@v4 - with: - languages: csharp - - - name: Restore - run: dotnet restore JD.SemanticKernel.Connectors.ClaudeCode.slnx - - - name: Build - run: > - dotnet build JD.SemanticKernel.Connectors.ClaudeCode.slnx - --configuration Release - --no-restore - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v4 +name: CodeQL + +on: + push: + branches: [main] + pull_request: + branches: [main] + schedule: + - cron: '0 12 * * 0' + +jobs: + analyze: + runs-on: ubuntu-latest + permissions: + security-events: write + actions: read + contents: read + steps: + - name: Checkout + uses: actions/checkout@v7 + with: + fetch-depth: 0 + + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: | + 8.0.x + 10.0.x + + - name: Initialize CodeQL + uses: github/codeql-action/init@v4 + with: + languages: csharp + + - name: Restore + run: dotnet restore JD.SemanticKernel.Connectors.ClaudeCode.slnx + + - name: Build + run: > + dotnet build JD.SemanticKernel.Connectors.ClaudeCode.slnx + --configuration Release + --no-restore + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v4 diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index b3e4936..0f14ccf 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -15,7 +15,7 @@ jobs: timeout-minutes: 10 steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Dependency Review uses: actions/dependency-review-action@v5 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9c09f03..50382e4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: fetch-depth: 0 @@ -71,7 +71,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: fetch-depth: 0 diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 1f95196..255e11c 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,44 +1,44 @@ -name: Auto Label - -on: - pull_request: - types: [opened, synchronize, reopened] - issues: - types: [opened, reopened] - -permissions: - contents: read - issues: write - pull-requests: write - -jobs: - label-pr: - name: Label Pull Request - if: github.event_name == 'pull_request' - runs-on: ubuntu-latest - timeout-minutes: 5 - steps: - - name: Checkout - uses: actions/checkout@v6 - - - name: Label based on files - uses: actions/labeler@v6 - with: - configuration-path: .github/labeler.yml - repo-token: ${{ secrets.GITHUB_TOKEN }} - - label-size: - name: Label PR Size - if: github.event_name == 'pull_request' - runs-on: ubuntu-latest - timeout-minutes: 5 - steps: - - name: Label by size - uses: codelytv/pr-size-labeler@v1 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - xs_max_size: '10' - s_max_size: '100' - m_max_size: '500' - l_max_size: '1000' - fail_if_xl: 'false' +name: Auto Label + +on: + pull_request: + types: [opened, synchronize, reopened] + issues: + types: [opened, reopened] + +permissions: + contents: read + issues: write + pull-requests: write + +jobs: + label-pr: + name: Label Pull Request + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Label based on files + uses: actions/labeler@v6 + with: + configuration-path: .github/labeler.yml + repo-token: ${{ secrets.GITHUB_TOKEN }} + + label-size: + name: Label PR Size + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Label by size + uses: codelytv/pr-size-labeler@v1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + xs_max_size: '10' + s_max_size: '100' + m_max_size: '500' + l_max_size: '1000' + fail_if_xl: 'false' diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index f7dc948..6007996 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -24,7 +24,7 @@ jobs: timeout-minutes: 30 steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: fetch-depth: 0 @@ -68,7 +68,7 @@ jobs: --logger "trx;LogFileName=test-results.trx" - name: Publish test results - uses: EnricoMi/publish-unit-test-result-action@v2.23.0 + uses: EnricoMi/publish-unit-test-result-action@v2.24.0 if: always() with: files: | diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index 9de5546..ac49fb7 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -1,96 +1,96 @@ -name: Version Bump - -on: - push: - branches: [main] - -jobs: - version-bump: - # Skip when the triggering commit is itself a version bump (loop prevention) - if: "!startsWith(github.event.head_commit.message, 'chore(version):')" - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - name: Checkout - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - name: Setup .NET - uses: actions/setup-dotnet@v5 - with: - dotnet-version: 8.0.x - - - name: Install NBGV - run: dotnet tool install -g nbgv - - - name: Determine bump type from conventional commits - id: bump - shell: bash - run: | - # Analyze commits since the last version.json change - LAST_BUMP=$(git rev-list --max-count=1 HEAD -- version.json) - if [ -n "$LAST_BUMP" ]; then - COMMITS=$(git log "${LAST_BUMP}..HEAD" --format="%B") - else - COMMITS=$(git log --format="%B") - fi - - echo "Commits to analyze:" - echo "$COMMITS" - - BUMP="none" - # Breaking changes → major (BREAKING CHANGE footer or ! after type) - if grep -qE '(BREAKING CHANGE|^[a-z]+(\(.+\))?!:)' <<< "$COMMITS"; then - BUMP="major" - # New features → minor - elif grep -qE '^feat(\(.+\))?:' <<< "$COMMITS"; then - BUMP="minor" - fi - # fix:/perf:/refactor: → no bump; NBGV commit height increments patch naturally - - echo "bump=$BUMP" >> $GITHUB_OUTPUT - echo "Determined bump: $BUMP" - - - name: Read current version - if: steps.bump.outputs.bump != 'none' - id: current - shell: bash - run: | - VERSION=$(python3 -c "import json; print(json.load(open('version.json'))['version'])") - echo "version=$VERSION" >> $GITHUB_OUTPUT - echo "Current version.json base: $VERSION" - - - name: Compute new version - if: steps.bump.outputs.bump != 'none' - id: newver - shell: bash - run: | - CURRENT="${{ steps.current.outputs.version }}" - BUMP="${{ steps.bump.outputs.bump }}" - IFS='.' read -r MAJOR MINOR <<< "$CURRENT" - if [ "$BUMP" == "major" ]; then - MAJOR_NEW=$((MAJOR + 1)) - NEW="${MAJOR_NEW}.0" - else - MINOR_NEW=$((MINOR + 1)) - NEW="${MAJOR}.${MINOR_NEW}" - fi - echo "new=$NEW" >> $GITHUB_OUTPUT - echo "New version.json base: $NEW" - - - name: Update version.json - if: steps.bump.outputs.bump != 'none' - shell: bash - run: nbgv set-version "${{ steps.newver.outputs.new }}" - - - name: Commit and push - if: steps.bump.outputs.bump != 'none' - shell: bash - run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git add version.json - git commit -m "chore(version): bump to ${{ steps.newver.outputs.new }} [${{ steps.bump.outputs.bump }}]" - git push origin main +name: Version Bump + +on: + push: + branches: [main] + +jobs: + version-bump: + # Skip when the triggering commit is itself a version bump (loop prevention) + if: "!startsWith(github.event.head_commit.message, 'chore(version):')" + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v7 + with: + fetch-depth: 0 + + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: 8.0.x + + - name: Install NBGV + run: dotnet tool install -g nbgv + + - name: Determine bump type from conventional commits + id: bump + shell: bash + run: | + # Analyze commits since the last version.json change + LAST_BUMP=$(git rev-list --max-count=1 HEAD -- version.json) + if [ -n "$LAST_BUMP" ]; then + COMMITS=$(git log "${LAST_BUMP}..HEAD" --format="%B") + else + COMMITS=$(git log --format="%B") + fi + + echo "Commits to analyze:" + echo "$COMMITS" + + BUMP="none" + # Breaking changes → major (BREAKING CHANGE footer or ! after type) + if grep -qE '(BREAKING CHANGE|^[a-z]+(\(.+\))?!:)' <<< "$COMMITS"; then + BUMP="major" + # New features → minor + elif grep -qE '^feat(\(.+\))?:' <<< "$COMMITS"; then + BUMP="minor" + fi + # fix:/perf:/refactor: → no bump; NBGV commit height increments patch naturally + + echo "bump=$BUMP" >> $GITHUB_OUTPUT + echo "Determined bump: $BUMP" + + - name: Read current version + if: steps.bump.outputs.bump != 'none' + id: current + shell: bash + run: | + VERSION=$(python3 -c "import json; print(json.load(open('version.json'))['version'])") + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "Current version.json base: $VERSION" + + - name: Compute new version + if: steps.bump.outputs.bump != 'none' + id: newver + shell: bash + run: | + CURRENT="${{ steps.current.outputs.version }}" + BUMP="${{ steps.bump.outputs.bump }}" + IFS='.' read -r MAJOR MINOR <<< "$CURRENT" + if [ "$BUMP" == "major" ]; then + MAJOR_NEW=$((MAJOR + 1)) + NEW="${MAJOR_NEW}.0" + else + MINOR_NEW=$((MINOR + 1)) + NEW="${MAJOR}.${MINOR_NEW}" + fi + echo "new=$NEW" >> $GITHUB_OUTPUT + echo "New version.json base: $NEW" + + - name: Update version.json + if: steps.bump.outputs.bump != 'none' + shell: bash + run: nbgv set-version "${{ steps.newver.outputs.new }}" + + - name: Commit and push + if: steps.bump.outputs.bump != 'none' + shell: bash + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add version.json + git commit -m "chore(version): bump to ${{ steps.newver.outputs.new }} [${{ steps.bump.outputs.bump }}]" + git push origin main