Skip to content

Commit f352736

Browse files
[controller] automate builds via GA
1 parent 9cce0b6 commit f352736

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Build and Sign IIAB APKs
2+
3+
on:
4+
push:
5+
branches: [ "main", "master" ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
name: Build Release APKs
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout Code
15+
uses: actions/checkout@v4
16+
17+
# We use Java 17, in sync with build.gradle
18+
- name: Set up JDK 17
19+
uses: actions/setup-java@v4
20+
with:
21+
distribution: 'zulu'
22+
java-version: '17'
23+
cache: 'gradle'
24+
25+
- name: Grant execute permission for gradlew
26+
run: chmod +x gradlew
27+
28+
- name: Decode Keystore
29+
env:
30+
ENCODED_STRING: ${{ secrets.KEYSTORE_BASE64 }}
31+
run: |
32+
# Decode the Base64 string back into a temporary physical .jks file
33+
echo $ENCODED_STRING | base64 -d > keystore.jks
34+
35+
- name: Build and Sign Release APKs
36+
env:
37+
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
38+
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
39+
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
40+
# Run assembleRelease injecting the signature, skipping store.properties
41+
run: |
42+
./gradlew assembleRelease \
43+
-Pandroid.injected.signing.store.file=$(pwd)/keystore.jks \
44+
-Pandroid.injected.signing.store.password=$KEYSTORE_PASSWORD \
45+
-Pandroid.injected.signing.key.alias=$KEY_ALIAS \
46+
-Pandroid.injected.signing.key.password=$KEY_PASSWORD
47+
48+
- name: Upload APK Artifacts
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: iiab-apks-release
52+
# The asterisk (*) will catch the 3 files: universal, arm64-v8a and armeabi-v7a
53+
path: app/build/outputs/apk/release/*.apk
54+
retention-days: 7
55+
56+
- name: Cleanup Keystore
57+
if: always()
58+
run: rm -f keystore.jks

0 commit comments

Comments
 (0)