From 1fe337d8de9af37e6333c1168f9cf04afd351737 Mon Sep 17 00:00:00 2001 From: prince Date: Fri, 10 Jul 2026 15:20:33 +0530 Subject: [PATCH] ci: build on Java 21, stop duplicate PR runs, attach release checksums --- .github/workflows/ci.yml | 10 ++++++++-- .github/workflows/release.yml | 6 ++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee23e7e..84725c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,11 @@ name: CI on: + # Only run the push build for the mainline; branch work is covered by the + # pull_request trigger below. Without this, pushing a feature/* branch that + # already has an open PR fires BOTH push and pull_request, running CI twice. push: - branches: [ main, 'feature/*' ] + branches: [ main ] pull_request: branches: [ main, 'feature/*' ] workflow_dispatch: @@ -20,7 +23,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ '17' ] + java: [ '21' ] steps: - name: Checkout uses: actions/checkout@v4 @@ -52,6 +55,9 @@ jobs: with: name: test-report-${{ github.sha }} path: build/reports/tests/test/** + # The project has no test sources yet, so the report dir may be + # absent; don't warn/fail the step when there is nothing to upload. + if-no-files-found: ignore retention-days: 7 - name: Upload fat jar diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 652773b..87c5811 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: temurin - java-version: '17' + java-version: '21' - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 @@ -48,4 +48,6 @@ jobs: with: name: "SpecOps ${{ github.ref_name }}" generate_release_notes: true - files: build/libs/*.jar + files: | + build/libs/*.jar + build/libs/*.sha256