From 956710c13572f849a8ccd5d5408e8d3bce4030fb Mon Sep 17 00:00:00 2001 From: Sk Niyaj Ali Date: Fri, 6 Sep 2024 22:51:50 +0530 Subject: [PATCH] Fix: Update workflows to build androidApp module (#2698) This commit updates the workflows to build the androidApp module instead of the mifospay module. The following changes were made: - Updated the `onPush.yml` workflow to build and archive the `androidApp` module. - Updated the `inflate-secrets` action to use the `androidApp` module. - Updated the `AppFile` to use the correct package name and credentials file. --- .github/actions/inflate-secrets/action.yml | 9 ++++----- .github/workflows/onPush.yml | 13 ++++++------- fastlane/AppFile | 4 ++-- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/actions/inflate-secrets/action.yml b/.github/actions/inflate-secrets/action.yml index 320266b98..43270455c 100644 --- a/.github/actions/inflate-secrets/action.yml +++ b/.github/actions/inflate-secrets/action.yml @@ -16,26 +16,25 @@ runs: - name: Mock debug google-services.json shell: bash run: | - cp .github/mock-google-services.json androdiApp/src/demo/google-services.json - cp .github/mock-google-services.json androdiApp/src/prod/google-services.json + cp .github/mock-google-services.json androidApp/src/google-services.json - name: Inflate release_keystore.keystore shell: bash env: KEYSTORE: ${{ inputs.keystore }} run: | - echo $KEYSTORE | base64 --decode > androdiApp/release_keystore.keystore + echo $KEYSTORE | androidApp/release_keystore.keystore - name: Inflate google-services.json shell: bash env: GOOGLE_SERVICES: ${{ inputs.google-services }} run: | - echo $GOOGLE_SERVICES > androdiApp/google-services.json + echo $GOOGLE_SERVICES > androidApp/google-services.json - name: Inflate playStorePublishServiceCredentialsFile.json shell: bash env: CREDS: ${{ inputs.playstore-creds }} run: | - echo $CREDS > androdiApp/playStorePublishServiceCredentialsFile.json + echo $CREDS > androidApp/playStorePublishServiceCredentialsFile.json diff --git a/.github/workflows/onPush.yml b/.github/workflows/onPush.yml index 791b679e2..f8481dfb5 100644 --- a/.github/workflows/onPush.yml +++ b/.github/workflows/onPush.yml @@ -63,7 +63,7 @@ jobs: KEYSTORE_ALIAS_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS_PASSWORD }} VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} run: | - ./gradlew :mifospay:assembleRelease + ./gradlew :androidApp:assembleRelease - name: Archive Build uses: actions/upload-artifact@v4 @@ -76,20 +76,19 @@ jobs: env: VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} run: | - echo $VERSION_CODE > ./app/build/outputs/version_code.txt + echo $VERSION_CODE > ./androidApp/build/outputs/version_code.txt - name: Create Github Pre-Release if: github.event.inputs.beta == 'true' uses: softprops/action-gh-release@v2.0.8 with: tag_name: ${{ steps.rel_number.outputs.version }} - body_path: ./app/build/outputs/changelogGithub + body_path: ./androidApp/build/outputs/changelogGithub draft: false prerelease: true files: | - ./mifospay/build/outputs/apk/demo/release/mifospay-demo-release.apk - ./mifospay/build/outputs/apk/prod/release/mifospay-prod-release.apk - ./mifospay/build/outputs/version_code.txt + ./androidApp/build/outputs/apk/release/androidApp-release.apk + ./androidApp/build/outputs/version_code.txt - name: Print `git status` run: git status @@ -144,7 +143,7 @@ jobs: KEYSTORE_ALIAS_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_ALIAS_PASSWORD }} VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} run: | - ./gradlew :mifospay:bundleRelease + ./gradlew :androidApp:bundleRelease - name: Deploy to Playstore Internal run: bundle exec fastlane deploy_internal diff --git a/fastlane/AppFile b/fastlane/AppFile index d85271893..496edc737 100644 --- a/fastlane/AppFile +++ b/fastlane/AppFile @@ -1,2 +1,2 @@ -json_key_file("") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one -package_name(ENV["STAGING_PACKAGE_NAME"]) # e.g. org.mifospay.demo \ No newline at end of file +json_key_file("app/playStorePublishServiceCredentialsFile.json") +package_name("org.mifos.mobile") # e.g. org.mifos.mobile \ No newline at end of file