From c770017010d78167a4453b9496054d53337ef3ce Mon Sep 17 00:00:00 2001 From: Pratyush Sharma <56130065+pratyush618@users.noreply.github.com> Date: Sun, 29 Mar 2026 21:05:42 +0530 Subject: [PATCH 1/4] fix: add distributionManagement to BOM for Maven Central deploy --- agenteval-bom/pom.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/agenteval-bom/pom.xml b/agenteval-bom/pom.xml index fbb137e..8a55c08 100644 --- a/agenteval-bom/pom.xml +++ b/agenteval-bom/pom.xml @@ -20,6 +20,17 @@ + + + ossrh + https://s01.oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + + From 0e42706ab6e44adc07620b845bcc419ad7d979bb Mon Sep 17 00:00:00 2001 From: Pratyush Sharma <56130065+pratyush618@users.noreply.github.com> Date: Sun, 29 Mar 2026 21:05:49 +0530 Subject: [PATCH 2/4] fix(ci): update all module versions including BOM on release --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7bc9e56..b628045 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,7 +46,7 @@ jobs: - name: Set release version run: | - ./mvnw versions:set -DnewVersion="${{ steps.version.outputs.version }}" -B --no-transfer-progress + ./mvnw versions:set -DnewVersion="${{ steps.version.outputs.version }}" -DprocessAllModules=true -B --no-transfer-progress - name: Maven build & verify run: ./mvnw verify -B --no-transfer-progress From bda4b8f76b98c93200c6da23772d6b66a5c3f0e1 Mon Sep 17 00:00:00 2001 From: Pratyush Sharma <56130065+pratyush618@users.noreply.github.com> Date: Sun, 29 Mar 2026 21:08:58 +0530 Subject: [PATCH 3/4] fix(ci): add BOM metadata, GPG signing, and deploy step for releases --- .github/workflows/release.yml | 9 +++++++++ agenteval-bom/pom.xml | 38 +++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b628045..be41362 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,6 +47,7 @@ jobs: - name: Set release version run: | ./mvnw versions:set -DnewVersion="${{ steps.version.outputs.version }}" -DprocessAllModules=true -B --no-transfer-progress + ./mvnw versions:set -DnewVersion="${{ steps.version.outputs.version }}" -B --no-transfer-progress -f agenteval-bom/pom.xml - name: Maven build & verify run: ./mvnw verify -B --no-transfer-progress @@ -54,6 +55,14 @@ jobs: - name: Gradle build & verify run: ./gradlew build --no-daemon + - name: Deploy BOM to Maven Central + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + run: | + ./mvnw deploy -Prelease -B --no-transfer-progress -f agenteval-bom/pom.xml + - name: Deploy to Maven Central env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} diff --git a/agenteval-bom/pom.xml b/agenteval-bom/pom.xml index 8a55c08..c9992fd 100644 --- a/agenteval-bom/pom.xml +++ b/agenteval-bom/pom.xml @@ -20,6 +20,20 @@ + + scm:git:git://github.com/ByteVeda/agenteval.git + scm:git:ssh://github.com:ByteVeda/agenteval.git + https://github.com/ByteVeda/agenteval/tree/main + + + + + pratyush618 + Pratyush + https://github.com/pratyush618 + + + ossrh @@ -31,6 +45,30 @@ + + + release + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.7 + + + sign-artifacts + verify + + sign + + + + + + + + + From 683781c55fe86ac7934bbd751bba5ffe293ba70a Mon Sep 17 00:00:00 2001 From: Pratyush Sharma <56130065+pratyush618@users.noreply.github.com> Date: Sun, 29 Mar 2026 21:13:32 +0530 Subject: [PATCH 4/4] fix(ci): improve cache cleanup for PR merge refs and stale branches --- .github/workflows/cache-cleanup.yml | 44 ++++++++++++++++++----------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/.github/workflows/cache-cleanup.yml b/.github/workflows/cache-cleanup.yml index 6529118..21a7a1d 100644 --- a/.github/workflows/cache-cleanup.yml +++ b/.github/workflows/cache-cleanup.yml @@ -4,7 +4,7 @@ on: pull_request: types: [closed] schedule: - - cron: '0 3 * * 0' # Sundays at 03:00 UTC + - cron: '0 3 * * *' # Daily at 03:00 UTC workflow_dispatch: permissions: @@ -20,20 +20,23 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Delete caches for closed PR branch + - name: Delete caches for closed PR env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge + PR_NUMBER: ${{ github.event.pull_request.number }} + HEAD_BRANCH: refs/heads/${{ github.event.pull_request.head.ref }} run: | - echo "Deleting caches for branch: $BRANCH" - gh actions-cache list --branch "$BRANCH" --limit 100 | \ - cut -f1 | \ - while read -r key; do - if [ -n "$key" ]; then - echo "Deleting cache: $key" - gh actions-cache delete "$key" --branch "$BRANCH" --confirm || true - fi - done + for branch in "refs/pull/$PR_NUMBER/merge" "$HEAD_BRANCH"; do + echo "Deleting caches for branch: $branch" + gh actions-cache list --branch "$branch" --limit 100 | \ + cut -f1 | \ + while read -r key; do + if [ -n "$key" ]; then + echo "Deleting cache: $key" + gh actions-cache delete "$key" --branch "$branch" --confirm || true + fi + done + done cleanup-stale-caches: name: Clean Up Stale Caches @@ -50,8 +53,9 @@ jobs: echo "=== Current cache usage ===" gh actions-cache list --limit 100 --sort last-used --order asc - # Get all open PR branch refs + # Get all open PR numbers and branch refs OPEN_BRANCHES=$(gh pr list --state open --json headRefName --jq '.[].headRefName') + OPEN_PR_NUMBERS=$(gh pr list --state open --json number --jq '.[].number') # Delete caches for branches that no longer have open PRs gh actions-cache list --limit 100 --sort last-used --order asc | while IFS=$'\t' read -r key size branch; do @@ -60,10 +64,18 @@ jobs: continue fi - # Extract branch name from ref - branch_name="${branch#refs/heads/}" + # Handle refs/pull/*/merge caches + if [[ "$branch" =~ ^refs/pull/([0-9]+)/merge$ ]]; then + pr_num="${BASH_REMATCH[1]}" + if ! echo "$OPEN_PR_NUMBERS" | grep -qx "$pr_num"; then + echo "Deleting stale PR cache: $key (branch: $branch)" + gh actions-cache delete "$key" --branch "$branch" --confirm || true + fi + continue + fi - # Check if branch has an open PR + # Handle refs/heads/* caches + branch_name="${branch#refs/heads/}" if ! echo "$OPEN_BRANCHES" | grep -qx "$branch_name"; then echo "Deleting stale cache: $key (branch: $branch)" gh actions-cache delete "$key" --branch "$branch" --confirm || true