From a7d2a684bebde5c0f7f6c8ea0b42c3e02557efc7 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 24 Oct 2026 10:47:44 +0000 Subject: [PATCH] Attest each artifact digest once The GitHub Packages layout has the same aar and jars as the Maven Central one under a lowercase name, and the attestation API rejects duplicate subject digests. Collect the subjects deduplicated by digest instead. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01QwfmMR3bsQCfffkJXMD6m2 --- .github/workflows/ci.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48d9022..7e24b87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -255,11 +255,18 @@ jobs: sha256sum * > SHA256SUMS cat SHA256SUMS - # The Javadoc jar of the release is the one in maven/, a subject can appear only once + # A digest can appear only once: the GitHub Packages layout and the release + # Javadoc jar share their files with the Maven Central layout. + - name: Collect attestation subjects + run: | + find release maven -type f \( -name '*.aar' -o -name '*.apk' -o -name '*.jar' -o -name '*.pom' \) -exec sha256sum {} + \ + | awk '{ name = $2; sub(/.*\//, "", name); if (!seen[$1]++) print $1 " " name }' > "$RUNNER_TEMP/subjects" + cat "$RUNNER_TEMP/subjects" + - name: Attest build provenance uses: actions/attest-build-provenance@v4 with: - subject-path: 'release/*.aar, release/*.apk, maven/**/*.aar, maven/**/*.jar, maven/**/*.pom' + subject-checksums: ${{ runner.temp }}/subjects - name: Tag release id: tag