mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
ci: add build provenance attestation (#2685)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
4da518d9bc
commit
e0feee7bb8
2 changed files with 25 additions and 0 deletions
12
.github/workflows/release.yml
vendored
12
.github/workflows/release.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
13
.github/workflows/reusable-android-build.yml
vendored
13
.github/workflows/reusable-android-build.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue