Skip to content

Commit

Permalink
Workflow: Added signing to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
donald-okara committed Nov 17, 2024
1 parent 6d320e3 commit 38e3441
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 36 deletions.
55 changes: 23 additions & 32 deletions .github/workflows/generate-apk-aab-debug-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,36 +58,27 @@ jobs:
- name: Build gradle project
run: ./gradlew build

# Create APK Debug
- name: Build apk debug project (APK) - ${{ env.main_project_module }} module
run: ./gradlew assembleDebug

# Create APK Release
- name: Build apk release project (APK) - ${{ env.main_project_module }} module
run: ./gradlew assemble

# Create Bundle AAB Release
- name: Build app bundle release (AAB) - ${{ env.main_project_module }} module
run: ./gradlew ${{ env.main_project_module }}:bundleRelease

# Upload Artifact Build
- name: Upload APK Debug - ${{ env.repository_name }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.date_today }} - ${{ env.app_name }} - ${{ env.repository_name }} - APK(s) debug generated
path: ${{ env.main_project_module }}/build/outputs/apk/debug/

- name: Upload APK Release - ${{ env.repository_name }}
uses: actions/upload-artifact@v4
- name: Decode KeyStore
run: echo "${{ secrets.SIGNINGKEYBASE64 }}" | base64 -d > preface-keystore.jks

- name: Build App
run: |
./gradlew assembleRelease
- name: Sign APK
run: |
jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 \
-keystore preface-keystore.jks \
-storepass "${{ secrets.KEYSTORE_PASSWORD }}" \
app/build/outputs/apk/release/app-release-unsigned.apk \
"${{ secrets.KEY_ALIAS }}"
- name: Align APK
run: |
zipalign -v 4 app/build/outputs/apk/release/app-release-unsigned.apk app/build/outputs/apk/release/app-release.apk
- name: Upload Release APK
uses: actions/upload-artifact@v3
with:
name: ${{ env.date_today }} - ${{ env.app_name }} - ${{ env.repository_name }} - APK(s) release generated
path: ${{ env.main_project_module }}/build/outputs/apk/release/

- name: Upload AAB (App Bundle) Release - ${{ env.repository_name }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.date_today }} - ${{ env.app_name }} - ${{ env.repository_name }} - App bundle(s) AAB release generated
path: ${{ env.main_project_module }}/build/outputs/bundle/release/


# You can now reference API_KEY, CLIENT_ID, and google-services.json locally in your app or build process
name: Preface-App
path: app/build/outputs/apk/release/app-release.apk
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,3 @@ app/src/main/res/values/secrets.xml
.cxx
local.properties
Preface
preface-key.jks.base64
signed.apk
signed.apk.idsig
your-key.jks
1 change: 1 addition & 0 deletions base64.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MIIK2gIBAzCCCoQGCSqGSIb3DQEHAaCCCnUEggpxMIIKbTCCBcQGCSqGSIb3DQEHAaCCBbUEggWxMIIFrTCCBakGCyqGSIb3DQEMCgECoIIFQDCCBTwwZgYJKoZIhvcNAQUNMFkwOAYJKoZIhvcNAQUMMCsEFJ85hNnMtnnn8b77/zpxcJDjjeZJAgInEAIBIDAMBggqhkiG9w0CCQUAMB0GCWCGSAFlAwQBKgQQ59L9Z4WJHYge61PcEtYz3gSCBNCtJOeVpDrq1Nbw6lA4ZEgxFuY+WgdpItph+xzq8zABqA+o8apKMH2DclGHFIa4wGi02BhuFirz81mMjIGqJuvhif01JW8dsJTh/69mctPUiir3VE+/fDiocJQI6VNpqt6EOkQJJxCVWkPa1K/6ExI2698K+dizLsu4ZQqAiak+PE+rHYR1ON+MUt4Qwhb/ColbcATWPBRm2f7LgR97KTYGG59dQ+UzhKC8rELj7J6MJbApYixxrTo/gO8x/DEXkh2InokkeqW6ksb63cg898zR0au8Lm4x9Ucl9sWTUtBm3nJt8bkr3ogHEmwqzL/M+8xsxDTF4ZnxYUfoqhS2kuhh1pwLhIaayUBwihfKrlsOLUIGhi4M43MicwRq2TnlmqhQU/5HwTQmbpLngbBTmG2Fa0mgv+CW4OUIzCFzLDpIPB4XU8KCsJ5DOocOZyLtYSM6sUicdtkG0+J8lp2hI1ml62bU4Vx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Ni/SaAzz52Jqa4D9QuLK46i8ds52GJ4vwmUWAdpkQtrKSkxiKuzAloBjMNQEAXzzhIPTZ7DN4wWcxUB/ADF/2FVTGk/Xx6fZgzhhSaRLUXduNtiaB7xEOAnVhm++B4rWRB/8K6OAfkKNIdki0kx3EI6nqAvNX9DC85vyJX9pCUvYmVMo7ume0P+E+ytTvCAocKOSmYh643ZRhLcZdgcpRtwHDukH3G3ZWQP+juCTP5aANGiAehwJkmFjodzxhPIjjqqhuAnrI3kT7Mny2vdAnWwon52EjRdvuRbPGCZxb1HPqR54Q1kq+nbsdHERScgXWtWmoO6T9/4cDDMKqLZ5Rci3LIp9XmfkAgzo9bu+4EnZm9sTvApo9HF3t60NWmyKchSFkjpOwL7gl5x42/JF0UkvmboLk36BfJ4B3bP0K5lGmQxESvEi0pPU4IxetkzpnK8G8BCZFjhUAPzTuscxQxVI1cXyTOW96+GCxkPY1ikLnEcKZydFpT8UetXcCsfY7DymbWCYR+vU8Gzs/wLbKKxUJZQ9p1TUA4KrNBJAnVLgK0PsolZ+R2EP0ID8tN1wPDVIFY5jgXLFnGRv+OfBgz4RtWOE5avOjfVpj5yFCRwOXTgIeNiFQUuTgYDfcph6GWXJoMvsYJksIY8zqjl8zMPuQnAv2uHkCNfOJQ/Mw5usPV3GNnDTY6mogME0wMTANBglghkgBZQMEAgEFAAQg7xS3Sbpm715VBQq6SLsjKPdYueWguI44Ulyra2p+RjgEFAFtcZijyQM8HPzMjYaUxNFiTG83AgInEA==
Binary file removed preface-key.jks
Binary file not shown.
Binary file added preface-keystore.jks
Binary file not shown.

0 comments on commit 38e3441

Please sign in to comment.