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 7cf1e87 commit 6d320e3
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions .github/workflows/generate-apk-aab-debug-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,6 @@ jobs:
- name: Change wrapper permissions
run: chmod +x ./gradlew

# Decode Keystore from Secrets and set up signing
- name: Decode Keystore and set up signing
run: |
echo "$KEYSTORE_FILE" | base64 -d > /tmp/my-release-key.jks
echo "storeFile=/tmp/preface-key.jks" >> $GITHUB_ENV
echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" >> $GITHUB_ENV
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> $GITHUB_ENV
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> $GITHUB_ENV
# Run Tests Build
- name: Run gradle tests
run: ./gradlew test
Expand All @@ -73,19 +64,11 @@ jobs:

# Create APK Release
- name: Build apk release project (APK) - ${{ env.main_project_module }} module
run: ./gradlew assembleRelease \
-Pandroid.injected.signing.store.file=$storeFile \
-Pandroid.injected.signing.store.password=$storePassword \
-Pandroid.injected.signing.key.alias=$keyAlias \
-Pandroid.injected.signing.key.password=$keyPassword
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 \
-Pandroid.injected.signing.store.file=$storeFile \
-Pandroid.injected.signing.store.password=$storePassword \
-Pandroid.injected.signing.key.alias=$keyAlias \
-Pandroid.injected.signing.key.password=$keyPassword
run: ./gradlew ${{ env.main_project_module }}:bundleRelease

# Upload Artifact Build
- name: Upload APK Debug - ${{ env.repository_name }}
Expand All @@ -105,3 +88,6 @@ jobs:
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

0 comments on commit 6d320e3

Please sign in to comment.