@@ -18,6 +18,12 @@ jobs:
1818 - name: Checkout code
1919 uses: actions/checkout@v4
2020
21+ - name: Decode release keystore
22+ if: env.RELEASE_KEYSTORE_BASE64 != ''
23+ env:
24+ RELEASE_KEYSTORE_BASE64: ${{ secrets.RELEASE_KEYSTORE_BASE64 }}
25+ run: echo "$RELEASE_KEYSTORE_BASE64" | base64 -d > app/release.keystore
26+
2127 - name: Set up JDK 17
2228 uses: actions/setup-java@v4
2329 with:
@@ -34,6 +40,11 @@ jobs:
3440 run: gradle wrapper --gradle-version 8.9
3541
3642 - name: Build release APK
43+ env:
44+ RELEASE_KEYSTORE_FILE: ${{ secrets.RELEASE_KEYSTORE_BASE64 != '' && 'release.keystore' || '' }}
45+ RELEASE_KEYSTORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
46+ RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }}
47+ RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
3748 run: ./gradlew assembleRelease
3849
3950 - name: Run unit tests
@@ -73,6 +84,12 @@ jobs:
7384 - name: Checkout code
7485 uses: actions/checkout@v4
7586
87+ - name: Decode release keystore
88+ if: env.RELEASE_KEYSTORE_BASE64 != ''
89+ env:
90+ RELEASE_KEYSTORE_BASE64: ${{ secrets.RELEASE_KEYSTORE_BASE64 }}
91+ run: echo "$RELEASE_KEYSTORE_BASE64" | base64 -d > app/release.keystore
92+
7693 - name: Set version from commit timestamp
7794 run: |
7895 VERSION_NAME=$(TZ=UTC git log -1 --format='%cd' --date=format-local:'%Y.%m.%d.%H%M')
@@ -94,6 +111,11 @@ jobs:
94111 run: gradle wrapper --gradle-version 8.9
95112
96113 - name: Build release APK
114+ env:
115+ RELEASE_KEYSTORE_FILE: ${{ secrets.RELEASE_KEYSTORE_BASE64 != '' && 'release.keystore' || '' }}
116+ RELEASE_KEYSTORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
117+ RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }}
118+ RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
97119 run: ./gradlew assembleRelease
98120
99121 - name: Rename APK with version