Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Migrate to fastlane for firebase app distribution #1824

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 18 additions & 16 deletions .github/workflows/build_and_publish_on_platforms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ jobs:
run: |
./gradlew :mifospay-android:assembleRelease




- name: Upload Android Artifact
uses: actions/upload-artifact@v4
with:
Expand All @@ -96,11 +93,6 @@ jobs:
./mifospay-android/build/outputs/apk/prod/release/mifospay-android-prod-release.apk







publish_android_on_firebase:
name: Deploy Android App On Firebase
needs: [ build_android, generate_release_info ]
Expand All @@ -118,6 +110,19 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Configure Ruby
uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1.202.0
with:
bundler-cache: true

- name: Install Fastlane
run: |
gem install bundler:2.2.27
bundle install --jobs 4 --retry 3
bundle exec fastlane add_plugin firebase_app_distribution
bundle exec fastlane add_plugin increment_build_number


- uses: ./.github/actions/inflate-secrets
name: Inflate Secrets
with:
Expand Down Expand Up @@ -150,11 +155,8 @@ jobs:

- name: ☁️ Deploy to Firebase
env:
KEYSTORE_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_FILE_PASSWORD }}
KEYSTORE_ALIAS: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS }}
KEYSTORE_ALIAS_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS_PASSWORD }}
VERSION_CODE: ${{ needs.generate_release_info.outputs.version_code }}
run: ./gradlew appDistributionUploadProdRelease --no-configuration-cache
run: bundle exec fastlane android deploy_on_firebase

publish_android_on_playstore:
name: Publish Android App On Play Store
Expand Down Expand Up @@ -518,12 +520,12 @@ jobs:
shell: pwsh
run: |
Compress-Archive -Path './all-artifacts/web-app/*' -DestinationPath './all-artifacts/mifospay-web-app.zip'

# Rename Ubuntu desktop artifact
- name: Rename Ubuntu Desktop Artifact
run: |
mv ./all-artifacts/desktop-app-ubuntu-latest/mifoswallet_1.0.0-1_amd64.deb ./all-artifacts/desktop-app-ubuntu-latest/MifosWallet-1.0.0.deb


- name: Download Git Changelog
uses: actions/download-artifact@v4
Expand All @@ -539,8 +541,8 @@ jobs:
prerelease: true
files: |
./all-artifacts/android-app/prod/release/mifospay-android-prod-release.apk
./all-artifacts/android-app/prod/release/mifospay-android-demo-release.apk
./all-artifacts/desktop-app-windows-latest/MifosWallet-1.0.0.exe
./all-artifacts/android-app/demo/release/mifospay-android-demo-release.apk
./all-artifacts/desktop-app-windows-latest/exe/MifosWallet-1.0.0.exe
./all-artifacts/desktop-app-windows-latest/msi/MifosWallet-1.0.0.msi
./all-artifacts/desktop-app-macos-latest/MifosWallet-1.0.0.dmg
./all-artifacts/desktop-app-ubuntu-latest/MifosWallet-1.0.0.deb
Expand Down
280 changes: 0 additions & 280 deletions .github/workflows/internal_or_beta_release.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/weekly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'internal_or_beta_release.yml',
workflow_id: 'build_and_publish_on_platforms.yml',
ref: 'dev',
inputs: {
"release_type": "beta",
Expand Down
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ plugins {
alias(libs.plugins.kotlin.parcelize) apply false
alias(libs.plugins.dependencyGuard) apply false
alias(libs.plugins.firebase.crashlytics) apply false
alias(libs.plugins.firebase.appdistribution) apply false
alias(libs.plugins.firebase.perf) apply false
alias(libs.plugins.gms) apply false
alias(libs.plugins.ksp) apply false
Expand Down
12 changes: 12 additions & 0 deletions fastlane/FastFile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ platform :android do
)
end

desc "Upload Android application to Firebase App Distribution"
lane :deploy_on_firebase do
release = firebase_app_distribution(
app: "1:728434912738:android:0490c291986f0a691a1dbb",
service_credentials_file: "mifospay-android/firebaseAppDistributionServiceCredentialsFile.json",
release_notes_file: "mifospay-android/build/outputs/changelogBeta",
android_artifact_type: "APK",
android_artifact_path: "mifospay-android/build/outputs/apk/prod/release/mifospay-android-prod-release.apk",
groups: "mifos-wallet-testers"
)
end

end


Expand Down
Loading
Loading