Skip to content

Commit b88d35d

Browse files
whtisclaude
andcommitted
ci: write google-services.json from secret (fix FCM build)
The Google Services plugin needs google-services.json at build time, but it's gitignored (kept out of the public repo). Decode it from the GOOGLE_SERVICES_JSON_B64 secret before the gradle build in both workflows. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent b39ff7b commit b88d35d

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/android-debug.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ jobs:
3333
- name: Set up Gradle (with cache)
3434
uses: gradle/actions/setup-gradle@v6
3535

36+
# google-services.json is gitignored (kept out of the public repo); the
37+
# Google Services plugin needs it at build time. Decode it from a secret.
38+
- name: Write google-services.json
39+
run: echo "${{ secrets.GOOGLE_SERVICES_JSON_B64 }}" | base64 -d > app/google-services.json
40+
3641
- name: Build debug APK
3742
run: ./gradlew :app:assembleDebug --no-daemon --stacktrace
3843

.github/workflows/android-release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ jobs:
5252
- name: Set up Gradle (with cache)
5353
uses: gradle/actions/setup-gradle@v6
5454

55+
# google-services.json is gitignored (kept out of the public repo); the
56+
# Google Services plugin needs it at build time. Decode it from a secret.
57+
- name: Write google-services.json
58+
run: echo "${{ secrets.GOOGLE_SERVICES_JSON_B64 }}" | base64 -d > app/google-services.json
59+
5560
- name: Derive version from tag
5661
id: ver
5762
shell: bash

0 commit comments

Comments
 (0)