Skip to content

Commit b1f84f9

Browse files
authored
Add Keystore decoding and installation steps
Added steps to decode and install the Keystore for Android builds, including creating key.properties.
1 parent 39d6588 commit b1f84f9

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ jobs:
2525
with:
2626
channel: 'stable'
2727
cache: true
28+
29+
- name: Decode and install Keystore
30+
run: |
31+
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > ${{ github.workspace }}/android/app/upload-keystore.jks
32+
echo "storeFile=${{ github.workspace }}/android/app/upload-keystore.jks" > ${{ github.workspace }}/android/key.properties
33+
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> ${{ github.workspace }}/android/key.properties
34+
echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> ${{ github.workspace }}/android/key.properties
35+
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> ${{ github.workspace }}/android/key.properties
36+
# This step will be skipped if the secrets are not found,
37+
# allowing for builds in forks that don't have the secrets.
38+
if: success() && secrets.KEYSTORE_BASE64 != ''
2839

2940
- name: Get Flutter dependencies
3041
run: flutter pub get
@@ -40,6 +51,7 @@ jobs:
4051
mv build/app/outputs/flutter-apk/app-release.apk release-artifacts/openlib-extended-universal-release.apk
4152
mv build/app/outputs/flutter-apk/app-arm64-v8a-release.apk release-artifacts/openlib-extended-arm64-v8a-release.apk
4253
mv build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk release-artifacts/openlib-extended-armeabi-v7a-release.apk
54+
4355
- name: Upload Release Assets
4456
uses: softprops/action-gh-release@v1
4557
with:

0 commit comments

Comments
 (0)