Skip to content

Commit

Permalink
git: added signtool for same signs
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanYuuki committed Jan 31, 2025
1 parent 7ab90dc commit 8ff6009
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,43 @@ jobs:
mv build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk build/app/outputs/flutter-apk/AnymeX-Android-armeabi-v7a.apk
mv build/app/outputs/flutter-apk/app-arm64-v8a-release.apk build/app/outputs/flutter-apk/AnymeX-Android-arm64.apk
mv build/app/outputs/flutter-apk/app-x86_64-release.apk build/app/outputs/flutter-apk/AnymeX-Android-x86_64.apk
- name: Build Universal APK
run: flutter build apk --release

- name: Rename Universal APK
run: mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/AnymeX-Android-universal.apk

- name: Decode Keystore
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
run: |
echo "$KEYSTORE_BASE64" | base64 --decode > keystore.jks
- name: Sign APKs
env:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: |
for apk in build/app/outputs/flutter-apk/*.apk; do
jarsigner \
-verbose \
-sigalg SHA256withRSA \
-digestalg SHA-256 \
-keystore keystore.jks \
-storepass $KEYSTORE_PASSWORD \
-keypass $KEY_PASSWORD \
$apk $KEY_ALIAS
done
# Verify APK Signatures
- name: Verify APKs
run: |
for apk in build/app/outputs/flutter-apk/*.apk; do
apksigner verify $apk
done
- name: Release Android APKs
uses: ncipollo/release-action@v1
with:
Expand Down

0 comments on commit 8ff6009

Please sign in to comment.