Skip to content

Commit d17a7d7

Browse files
committed
chore: Update GitHub Actions workflows
This commit updates the GitHub Actions workflows to: - Cache Gradle dependencies and build outputs to speed up builds. - Introduce a `build_type` input for the desktop app build workflow to allow for debug or release builds. - Update the APK finding logic in the Android app build workflow to accommodate changes in the build output directory structure. - Update workflow references to use actions from the `niyajali/mifos-mobile-github-actions` repository instead of `openMF/mifos-mobile-github-actions`. - Update the weekly release tagging workflow to use Reckon for tagging and trigger the multi-platform build and publish workflow for beta releases. - Add inputs for web, iOS, and Android package names in the PR check workflow.
1 parent 64fe5c7 commit d17a7d7

9 files changed

+72
-24
lines changed

Diff for: .github/actions/build-android-app/action.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ runs:
118118
shell: bash
119119
run: |
120120
# Find Demo APK
121-
demo_apk=$(find . -path "**/build/outputs/apk/demo/debug/*.apk" -print -quit)
121+
demo_apk=$(find . -path "**/build/outputs/apk/demo/**/*.apk" -print -quit)
122122
123123
# Find Prod APK
124-
prod_apk=$(find . -path "**/build/outputs/apk/prod/release/*.apk" -print -quit)
124+
prod_apk=$(find . -path "**/build/outputs/apk/prod/**/*.apk" -print -quit)
125125
126126
# Output APK paths
127127
echo "demo_apk=${demo_apk}" >> $GITHUB_OUTPUT

Diff for: .github/actions/build-desktop-app/action.yaml

+27-5
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,45 @@ inputs:
1010
description: 'Name of the desktop project module'
1111
required: true
1212

13+
build_type:
14+
description: 'Type of build to perform (Debug or Release)'
15+
required: false
16+
default: 'Debug'
17+
1318
runs:
1419
using: 'composite'
1520
steps:
1621
- name: Set up Java development environment
17-
uses: actions/setup-java@v2
22+
uses: actions/setup-java@v4
1823
with:
19-
distribution: 'zulu' # Use Zulu distribution of OpenJDK
20-
java-version: '17' # Use Java 17 version
24+
distribution: 'zulu'
25+
java-version: '17'
2126

2227
- name: Setup Gradle
2328
uses: gradle/actions/setup-gradle@v4
2429

30+
# Cache Gradle dependencies and build outputs to speed up future builds
31+
- name: Cache Gradle and build outputs
32+
uses: actions/cache@v4
33+
with:
34+
path: |
35+
~/.gradle/caches
36+
~/.gradle/wrapper
37+
build
38+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
39+
restore-keys: ${{ runner.os }}-gradle-
40+
2541
- name: Package Desktop App
2642
shell: bash
27-
run: ./gradlew packageDistributionForCurrentOS
43+
run: |
44+
# Determine the package command based on build type
45+
if [[ "${{ inputs.build_type }}" == "Release" ]]; then
46+
./gradlew packageReleaseDistributionForCurrentOS
47+
else
48+
./gradlew packageDistributionForCurrentOS
49+
fi
2850
29-
# Upload Windows executables and installers
51+
# Upload Windows executables
3052
- name: Upload Windows Apps
3153
if: matrix.os == 'windows-latest'
3254
uses: actions/upload-artifact@v4

Diff for: .github/workflows/build-and-deploy-site.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ permissions:
6262
jobs:
6363
build_and_deploy_web:
6464
name: Build And Deploy Web App
65-
uses: openMF/mifos-mobile-github-actions/.github/workflows/build-and-deploy-site.yaml@main
65+
uses: niyajali/mifos-mobile-github-actions/.github/workflows/build-and-deploy-site.yaml@main
6666
secrets: inherit
6767
with:
6868
web_package_name: 'mifospay-web' # <-- Change with your web package name

Diff for: .github/workflows/build-desktop-app.yaml

-7
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,3 @@ jobs:
2020
id: build-desktop
2121
with:
2222
desktop_package_name: 'mifospay-desktop'
23-
24-
- name: Display Desktop App Paths
25-
run: |
26-
echo "Windows Exec: ${{ steps.build-desktop.outputs.windows_exec }}"
27-
echo "Windows Installer: ${{ steps.build-desktop.outputs.windows_inst }}"
28-
echo "Linux App: ${{ steps.build-desktop.outputs.linux_app }}"
29-
echo "MacOS App: ${{ steps.build-desktop.outputs.macos_app }}"

Diff for: .github/workflows/monthly-version-tag.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ concurrency:
6262
jobs:
6363
monthly_release:
6464
name: Tag Monthly Release
65-
uses: openMF/mifos-mobile-github-actions/.github/workflows/monthly-version-tag.yaml@main
65+
uses: niyajali/mifos-mobile-github-actions/.github/workflows/monthly-version-tag.yaml@main
6666
secrets: inherit

Diff for: .github/workflows/multi-platform-build-and-publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ concurrency:
113113
jobs:
114114
multi_platform_build_and_publish:
115115
name: Multi-Platform Build and Publish
116-
uses: openMF/mifos-mobile-github-actions/.github/workflows/multi-platform-build-and-publish.yaml@main
116+
uses: niyajali/mifos-mobile-github-actions/.github/workflows/multi-platform-build-and-publish.yaml@main
117117
secrets: inherit
118118
with:
119119
release_type: ${{ inputs.release_type }}

Diff for: .github/workflows/pr-check.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ permissions:
8181
jobs:
8282
pr_checks:
8383
name: PR Checks
84-
uses: openMF/mifos-mobile-github-actions/.github/workflows/pr-check.yaml@main
84+
uses: niyajali/mifos-mobile-github-actions/.github/workflows/pr-check.yaml@main
8585
secrets: inherit
8686
with:
8787
android_package_name: 'mifospay-android'
8888
desktop_package_name: 'mifospay-desktop'
89+
web_package_name: 'mifospay-web'
90+
ios_package_name: 'mifospay-ios'

Diff for: .github/workflows/promote-to-production.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
# Job to promote app from beta to production in Play Store
7777
play_promote_production:
7878
name: Promote Beta to Production Play Store
79-
uses: openMF/mifos-mobile-github-actions/.github/workflows/promote-to-production.yaml@main
79+
uses: niyajali/mifos-mobile-github-actions/.github/workflows/promote-to-production.yaml@main
8080
if: ${{ inputs.publish_to_play_store == true }}
8181
secrets: inherit
8282
with:

Diff for: .github/workflows/tag-weekly-release.yml

+36-5
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,39 @@ concurrency:
7878

7979
jobs:
8080
tag:
81-
name: Tag Weekly Release
82-
uses: openMF/mifos-mobile-github-actions/.github/workflows/tag-weekly-release.yaml@main
83-
secrets: inherit
84-
with:
85-
target_branch: 'dev'
81+
steps:
82+
# Checkout the repository with full history for proper versioning
83+
- uses: actions/checkout@v4
84+
with:
85+
fetch-depth: 0
86+
87+
# Setup Java environment for Gradle operations
88+
- name: Set up JDK 17
89+
uses: actions/[email protected]
90+
with:
91+
distribution: 'temurin'
92+
java-version: '17'
93+
94+
# Create and push a new version tag using Reckon
95+
# This uses the 'final' stage for production-ready releases
96+
- name: Tag Weekly Release
97+
env:
98+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99+
run: ./gradlew :reckonTagPush -Preckon.stage=final
100+
101+
# Trigger the build and publish workflow for beta release
102+
# This starts the process of building and deploying the app to various platforms
103+
- name: Trigger Workflow
104+
uses: actions/github-script@v7
105+
with:
106+
script: |
107+
github.rest.actions.createWorkflowDispatch({
108+
owner: context.repo.owner,
109+
repo: context.repo.repo,
110+
workflow_id: 'multi-platform-build-and-publish.yml',
111+
ref: 'dev',
112+
inputs: {
113+
"release_type": "beta",
114+
},
115+
})
116+

0 commit comments

Comments
 (0)