Skip to content

Commit

Permalink
Update android-ci-cd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MRfantastic3DGamer authored Dec 22, 2024
1 parent b3bc6ad commit 4984162
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/android-ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,33 +35,29 @@ jobs:
- name: Grant execute permission for Gradle wrapper
run: chmod +x ./gradlew

# Step 5: Build the app using Gradle
- name: Build APK
run: ./gradlew assembleRelease

# Create the directory to store the keystore
- name: Create keystore directory
run: mkdir -p keystore

# Decode and store the keystore file
- name: Decode Keystore
run: echo "$ANDROID_KEYSTORE" | base64 --decode > keystore/android.keystore
env:
ANDROID_KEYSTORE: ${{ secrets.ANDROID_KEYSTORE }}
run: echo "$KEYSTORE_FILE" | base64 --decode > keystore/android.p12

# Step 5: Build the app using Gradle
- name: Build APK
run: ./gradlew assembleRelease

# Sign APK
# Sign the APK using the .p12 keystore
- name: Sign APK
env:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: |
jarsigner -verbose \
-keystore keystore/android.keystore \
-storepass "$KEYSTORE_PASSWORD" \
-keypass "$KEY_PASSWORD" \
app/build/outputs/apk/release/app-release-unsigned.apk \
"$KEY_ALIAS"
-keystore keystore/android.p12 \
-storetype PKCS12 \
-storepass "$KEYSTORE_PASSWORD" \
-keypass "$KEY_PASSWORD" \
app/build/outputs/apk/release/app-release-unsigned.apk \
"$KEY_ALIAS"
# Step 7: Align APK using zipalign
- name: Align APK
Expand Down

0 comments on commit 4984162

Please sign in to comment.