-
Notifications
You must be signed in to change notification settings - Fork 9
120 lines (103 loc) · 4.33 KB
/
Copy pathandroid-build.yml
File metadata and controls
120 lines (103 loc) · 4.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Android App CI
permissions:
contents: read
id-token: write
attestations: write
artifact-metadata: write
on:
push:
branches: [ master ]
jobs:
build-android:
runs-on: ubuntu-latest-8-cores
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # was v4
with:
persist-credentials: false
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # was v22
with:
github-token: ""
- name: Cache Bun dependencies
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # was v4
with:
path: |
~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('frontend/bun.lock') }}
- name: Cache Gradle
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # was v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('frontend/src-tauri/gen/android/**/*.gradle*', 'frontend/src-tauri/gen/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache sccache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # was v4
with:
path: ~/.cache/sccache
key: ${{ runner.os }}-sccache-android-release-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-sccache-android-release-
${{ runner.os }}-sccache-android-
${{ runner.os }}-sccache-
- name: Build Tauri Android App (signed)
run: nix develop .#android -c ./scripts/ci/android-release.sh
env:
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
- name: Show sccache stats
if: always()
run: nix develop .#android -c sccache --show-stats
- name: Collect Android release checksums
run: |
nix develop .#android -c ./scripts/ci/attestation-manifest.sh \
android-release-artifacts.sha256 \
frontend/src-tauri/target/reproducibility/android-release-final.sha256 \
frontend/src-tauri/target/reproducibility/android-release-*.sha256
cat android-release-artifacts.sha256
- name: Attest Android release artifacts
# Keep uploads/verifiers running if GitHub token policy rejects artifact attestation.
continue-on-error: true
uses: actions/attest@281a49d4cbb0a72c9575a50d18f6deb515a11deb # was v4
with:
subject-checksums: android-release-artifacts.sha256
- name: Upload Android APK
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # was v4
with:
name: maple-android-apk
path: |
frontend/src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release.apk
frontend/src-tauri/target/reproducibility/*.sha256
retention-days: 5
- name: Upload Android AAB
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # was v4
with:
name: maple-android-aab
path: |
frontend/src-tauri/gen/android/app/build/outputs/bundle/universalRelease/app-universal-release.aab
frontend/src-tauri/target/reproducibility/*.sha256
retention-days: 5
verify-android-artifacts:
needs: build-android
runs-on: ubuntu-latest-8-cores
permissions:
contents: read
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # was v4
with:
persist-credentials: false
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # was v22
with:
github-token: ""
- name: Download Android artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # was v4
with:
path: artifacts
- name: Verify Android artifact reproducibility proofs
env:
MAPLE_REQUIRE_ANDROID_SIGNATURE_VERIFICATION: "1"
run: nix develop .#android -c ./scripts/ci/verify-release-artifacts.sh artifacts android