@@ -188,42 +188,81 @@ jobs:
188188 name : Build snd-android
189189 runs-on : ubuntu-latest
190190 needs : build-frontend
191+
191192 steps :
192193 - name : Checkout Repo
193- uses : actions/checkout@v3
194+ uses : actions/checkout@v4
195+
194196 - name : Download Frontend
195197 uses : actions/download-artifact@v4
196198 with :
197199 name : snd-frontend
198200 path : frontend/dist
201+
199202 - name : Setup Go environment
200- uses : actions/setup-go@v3
203+ uses : actions/setup-go@v5
201204 with :
202205 cache : true
203206 go-version-file : go.mod
204207 cache-dependency-path : go.sum
208+
205209 - name : Setup Java
206210 uses : actions/setup-java@v4
207211 with :
208212 distribution : temurin
209213 java-version : 17
214+
210215 - name : Setup Android SDK
211216 uses : android-actions/setup-android@v3
217+
212218 - name : Setup Gradle
213219 uses : gradle/actions/setup-gradle@v4
214- with :
215- gradle-version : 9.5.1
220+
216221 - name : Install gomobile
217222 run : |
218223 go install golang.org/x/mobile/cmd/gomobile@latest
219224 gomobile init
225+
226+ - name : Restore Android signing keystore
227+ shell : bash
228+ env :
229+ KEYSTORE_BASE64 : ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
230+ run : |
231+ printf '%s' "$KEYSTORE_BASE64" \
232+ | base64 --decode \
233+ > "$RUNNER_TEMP/release-key.jks"
234+
220235 - name : Build Android release APK
221236 run : ./build_android.sh
222237 env :
223238 SND_ANDROID_GRADLE_TASK : assembleRelease
224239 SND_ANDROID_INSTALL_NDK : " true"
225240 SND_SKIP_FRONTEND_BUILD : " true"
226241 SND_RELEASE_DIR : build/release
242+
243+ ANDROID_KEYSTORE_PATH : ${{ runner.temp }}/release-key.jks
244+ ANDROID_KEYSTORE_PASSWORD : ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
245+ ANDROID_KEY_ALIAS : ${{ secrets.ANDROID_KEY_ALIAS }}
246+ ANDROID_KEY_PASSWORD : ${{ secrets.ANDROID_KEY_PASSWORD }}
247+
248+ - name : Verify APK signature
249+ shell : bash
250+ run : |
251+ APK="$(find build/release -name '*.apk' -type f | head -n 1)"
252+
253+ if [ -z "$APK" ]; then
254+ echo "No APK found"
255+ exit 1
256+ fi
257+
258+ APKSIGNER="$(find "$ANDROID_HOME/build-tools" \
259+ -name apksigner \
260+ -type f \
261+ | sort -V \
262+ | tail -n 1)"
263+
264+ "$APKSIGNER" verify --verbose --print-certs "$APK"
265+
227266 - name : Archive Android Build
228267 uses : actions/upload-artifact@v4
229268 with :
0 commit comments