File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -154,8 +154,19 @@ jobs:
154154 - name : Setup Android SDK
155155 uses : android-actions/setup-android@v3
156156
157- - name : Decode google-services.json
158- run : echo "${{ secrets.GOOGLE_SERVICES_JSON }}" | base64 -d > app/google-services.json
157+ - name : Provide google-services.json
158+ env :
159+ GOOGLE_SERVICES_JSON_B64 : ${{ secrets.GOOGLE_SERVICES_JSON }}
160+ run : |
161+ if [ -n "$GOOGLE_SERVICES_JSON_B64" ]; then
162+ echo "$GOOGLE_SERVICES_JSON_B64" | base64 -d > app/google-services.json
163+ echo "Using google-services.json from secret."
164+ elif [ -f "app/google-services.json" ]; then
165+ echo "Using checked-in app/google-services.json."
166+ else
167+ echo "ERROR: app/google-services.json not found and GOOGLE_SERVICES_JSON secret is empty."
168+ exit 1
169+ fi
159170
160171 - name : Build release APK
161172 run : ./gradlew assembleRelease
You can’t perform that action at this time.
0 commit comments