ci: add build provenance attestation (#2685)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich 2025-08-11 11:01:54 -05:00 committed by GitHub
parent 4da518d9bc
commit e0feee7bb8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 25 additions and 0 deletions

View file

@ -168,6 +168,10 @@ jobs:
create-github-release:
needs: [ prepare-release-info, build-fdroid, build-google ]
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
attestations: write
# Only run this job if the input create_github_release is true
if: github.repository == 'meshtastic/Meshtastic-Android' && github.event.inputs.create_github_release == 'true'
steps:
@ -260,3 +264,11 @@ jobs:
asset_path: ./version_info.txt
asset_name: version_info.txt
asset_content_type: text/plain
- name: Attest Build Provenance
uses: actions/attest-build-provenance@v2
with:
subject-path: |
./google-apk-download/app-google-release.apk
./google-aab-download/app-google-release.aab
./fdroid-apk-download/app-fdroid-release.apk

View file

@ -19,6 +19,10 @@ on:
jobs:
build_and_detekt:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
attestations: write
timeout-minutes: 35
env:
DATADOG_APPLICATION_ID: ${{ secrets.DATADOG_APPLICATION_ID }}
@ -79,6 +83,15 @@ jobs:
name: googleDebug
path: app/build/outputs/apk/google/debug/app-google-debug.apk
retention-days: 14
- name: Attest Build Provenance
if: ${{ inputs.upload_artifacts && github.ref_name == 'main' && github.repository == 'meshtastic/Meshtastic-Android' }}
uses: actions/attest-build-provenance@v2
with:
subject-path: |
app/build/outputs/apk/google/debug/app-google-debug.apk
app/build/outputs/apk/fdroid/debug/app-fdroid-debug.apk
- name: Upload reports
if: ${{ inputs.upload_artifacts }}
uses: actions/upload-artifact@v4