Skip to content

Commit

Permalink
fix: Fixed Desktop Versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
niyajali committed Nov 19, 2024
1 parent 7e60a03 commit b5208bb
Show file tree
Hide file tree
Showing 36 changed files with 202 additions and 295 deletions.
10 changes: 10 additions & 0 deletions .github/actions/inflate-secrets/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ inputs:
playstore-creds:
description: 'The playstore credentials to inflate'
required: true
firebase-creds:
description: 'The firebase credentials to inflate'
required: true
runs:
using: 'composite'
steps:
Expand Down Expand Up @@ -38,3 +41,10 @@ runs:
CREDS: ${{ inputs.playstore-creds }}
run: |
echo $CREDS > mifospay-android/playStorePublishServiceCredentialsFile.json
- name: Inflate firebaseAppDistributionServiceCredentialsFile.json
shell: bash
env:
CREDS: ${{ inputs.firebase-creds }}
run: |
echo $CREDS > mifospay-android/firebaseAppDistributionServiceCredentialsFile.json
13 changes: 13 additions & 0 deletions .github/mockFirebaseAppDistributionServiceCredentialsFile.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"type": "service_account",
"project_id": "mifoswallet-baa0c",
"private_key_id": "private_key_id",
"private_key": "private_key",
"client_email": "client_email",
"client_id": "111380693391682832489",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-w3hi9%40mifoswallet-baa0c.iam.gserviceaccount.com",
"universe_domain": "googleapis.com"
}
65 changes: 65 additions & 0 deletions .github/workflows/deploy_site.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Publish Web App

on:
workflow_dispatch:

permissions:
contents: write
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build_web_app:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17

- name: Build Web(JS) App
run: ./gradlew jsBrowserDistribution

- name: Copy build files to docs
run: |
# Create docs directory if it doesn't exist
mkdir -p docs
# Clear existing contents of docs directory
rm -rf docs/*
# Copy all contents from build directory to docs
cp -r ./mifospay-web/build/dist/js/productionExecutable/* docs/
# Add a .nojekyll file to bypass Jekyll processing
touch .nojekyll
- name: Commit and push if changed
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
# Configure git to be quiet
git config --global advice.pushUpdateRejected false
git config --global advice.pushNonFFCurrent false
git config --global advice.pushNonFFMatching false
git config --global advice.pushAlreadyExists false
# Add and commit silently
git add docs .nojekyll > /dev/null 2>&1
git commit --quiet -m "Update docs folder" > /dev/null 2>&1 || true
# Force push silently
git push --force-with-lease --quiet origin HEAD > /dev/null 2>&1
- name: Setup Pages
uses: actions/configure-pages@v5

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
19 changes: 18 additions & 1 deletion .github/workflows/internal_or_beta_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
run: ./gradlew packageReleaseDistributionForCurrentOS

app_build:
name: Github, Firebase, and Sentry Release
name: Github, Firebase Release
needs: [ build_desktop_app ]
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -76,6 +76,7 @@ jobs:
keystore: ${{ secrets.ORIGINAL_KEYSTORE_FILE }}
google-services: ${{ secrets.GOOGLESERVICES }}
playstore-creds: ${{ secrets.PLAYSTORECREDS }}
firebase-creds: ${{ secrets.FIREBASECREDS }}

- uses: ./.github/actions/create-release-notes
name: Create Release Notes
Expand Down Expand Up @@ -121,6 +122,15 @@ jobs:
./mifospay-desktop/build/compose/binaries/main-release/msi/*.msi
./mifospay-desktop/build/compose/binaries/main-release/deb/*.deb
./mifospay-desktop/build/compose/binaries/main-release/dmg/*.dmg

- 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: ${{ steps.rel_number.outputs.version-code }}
run: ./gradlew appDistributionUploadProdRelease --no-configuration-cache

- name: Print `git status`
run: git status
Expand Down Expand Up @@ -161,6 +171,7 @@ jobs:
keystore: ${{ secrets.UPLOAD_KEYSTORE_FILE }}
google-services: ${{ secrets.GOOGLESERVICES }}
playstore-creds: ${{ secrets.PLAYSTORECREDS }}
firebase-creds: ${{ secrets.FIREBASECREDS }}

- uses: ./.github/actions/create-release-notes
name: Create Release Notes
Expand All @@ -177,6 +188,12 @@ jobs:
run: |
./gradlew :mifospay-android:bundleRelease
- name: Archive Build
uses: actions/upload-artifact@v4
with:
name: release-aabs
path: ./**/*.aab

- name: Deploy to Playstore Internal
run: bundle exec fastlane deploy_internal

Expand Down
37 changes: 7 additions & 30 deletions .github/workflows/master_dev_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
dependency_guard:
needs: setup
runs-on: ubuntu-latest
Expand Down Expand Up @@ -100,32 +101,8 @@ jobs:
disable_globbing: true
commit_message: "🤖 Updates baselines for Dependency Guard"

tests_and_lint:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Run tests
run: |
./gradlew :mifospay-android:testDemoDebug
# ./gradlew testDemoDebug :lint:test :mifospay-android:lintProdRelease :lint:lint
- name: Upload reports
if: always()
uses: actions/upload-artifact@v4
with:
name: test-and-lint-reports
path: |
**/build/reports/lint-results-*.html
**/build/test-results/test*UnitTest/**.xml
build:
needs: [ checks, dependency_guard, tests_and_lint ]
needs: [ checks, dependency_guard ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -145,11 +122,11 @@ jobs:
- name: Upload APKs
uses: actions/upload-artifact@v4
with:
name: APKs
name: Android APKs
path: '**/build/outputs/apk/**/*.apk'

build_desktop_app:
needs: [ checks, dependency_guard, tests_and_lint ]
needs: [ checks, dependency_guard ]
strategy:
matrix:
os:
Expand All @@ -174,7 +151,7 @@ jobs:
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: Windows-App
name: Windows-Apps
path: |
./mifospay-desktop/build/compose/binaries/main/exe/*.exe
./mifospay-desktop/build/compose/binaries/main/msi/*.msi
Expand All @@ -183,12 +160,12 @@ jobs:
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: Windows-App
name: Linux-App
path: './mifospay-desktop/build/compose/binaries/main/deb/*.deb'

- name: Upload MacOS App
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: Windows-App
name: MacOS-App
path: './mifospay-desktop/build/compose/binaries/main/dmg/*.dmg'
1 change: 1 addition & 0 deletions .github/workflows/release_to_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
keystore: ${{ secrets.ORIGINAL_KEYSTORE_FILE }}
google-services: ${{ secrets.GOOGLESERVICES }}
playstore-creds: ${{ secrets.PLAYSTORECREDS }}
firebase-creds: ${{ secrets.FIREBASECREDS }}

- name: Promote Beta to Production Play Store
run: bundle exec fastlane promote_to_production
2 changes: 1 addition & 1 deletion .github/workflows/weekly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- name: Tag Weekly Release
env:
GITHUB_TOKEN: ${{ secrets.TAG_PUSH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew :reckonTagPush -Preckon.stage=final

- name: Trigger Workflow
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ 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
5 changes: 0 additions & 5 deletions core/data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ kotlin {
implementation(libs.kotlinx.serialization.json)
}

commonTest.dependencies {
implementation(libs.multiplatform.settings)
implementation(libs.multiplatform.settings.test)
}

androidMain.dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.tracing.ktx)
Expand Down
1 change: 0 additions & 1 deletion core/datastore-proto/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions core/datastore-proto/README.md

This file was deleted.

43 changes: 0 additions & 43 deletions core/datastore-proto/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion core/datastore/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
plugins {
alias(libs.plugins.mifospay.kmp.library)
id("kotlinx-serialization")
}

android {
Expand All @@ -33,7 +34,6 @@ kotlin {
implementation(libs.kotlinx.serialization.core)
implementation(projects.core.model)
implementation(projects.core.common)
implementation(projects.core.datastoreProto)
}

commonTest.dependencies {
Expand Down
Loading

0 comments on commit b5208bb

Please sign in to comment.