1
- name : KMP Publish Desktop App
2
- description : ' Publish the desktop app to the respective app stores'
1
+ name : KMP Build Desktop App
2
+ description : ' Build the desktop application for all platforms'
3
+ author : ' Mifos Initiative'
3
4
branding :
4
5
icon : ' play'
5
6
color : ' orange'
6
7
7
8
inputs :
8
9
desktop_package_name :
9
- description : ' Name of the Android project module'
10
+ description : ' Name of the desktop project module'
10
11
required : true
11
- windows_signing_key :
12
- description : ' Windows signing key'
13
- required : false
14
- windows_signing_password :
15
- description : ' Windows signing password'
16
- required : false
17
- windows_signing_certificate :
18
- description : ' Windows signing certificate'
19
- required : false
20
- macos_signing_key :
21
- description : ' MacOS signing key'
22
- required : false
23
- macos_signing_password :
24
- description : ' MacOS signing password'
25
- required : false
26
- macos_signing_certificate :
27
- description : ' MacOS signing certificate'
28
- required : false
29
- linux_signing_key :
30
- description : ' Linux signing key'
31
- required : false
32
- linux_signing_password :
33
- description : ' Linux signing password'
34
- required : false
35
- linux_signing_certificate :
36
- description : ' Linux signing certificate'
12
+
13
+ build_type :
14
+ description : ' Type of build to perform (Debug or Release)'
37
15
required : false
16
+ default : ' Debug'
17
+
18
+ outputs :
19
+ windows_exec :
20
+ description : ' Path to Windows executable'
21
+ value : ${{ steps.collect-windows.outputs.windows_exec }}
22
+
23
+ windows_inst :
24
+ description : ' Path to Windows installer'
25
+ value : ${{ steps.collect-windows.outputs.windows_inst }}
26
+
27
+ linux_app :
28
+ description : ' Path to Linux package'
29
+ value : ${{ steps.collect-linux.outputs.linux_app }}
30
+
31
+ macos_app :
32
+ description : ' Path to MacOS package'
33
+ value : ${{ steps.collect-macos.outputs.macos_app }}
34
+
38
35
runs :
39
36
using : ' composite'
40
37
steps :
41
38
- name : Set up Java development environment
42
39
uses : actions/setup-java@v4
43
40
with :
44
- distribution : ' zulu' # Use Zulu distribution of OpenJDK
45
- java-version : ' 17' # Use Java 17 version
41
+ distribution : ' zulu'
42
+ java-version : ' 17'
46
43
47
44
- name : Setup Gradle
48
45
uses : gradle/actions/setup-gradle@v4
@@ -55,12 +52,53 @@ runs:
55
52
~/.gradle/caches
56
53
~/.gradle/wrapper
57
54
build
58
- key : ${{ matrix .os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
59
- restore-keys : ${{ matrix .os }}-gradle-
55
+ key : ${{ runner .os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
56
+ restore-keys : ${{ runner .os }}-gradle-
60
57
61
58
- name : Package Desktop App
62
59
shell : bash
63
- run : ./gradlew packageReleaseDistributionForCurrentOS
60
+ run : |
61
+ # Determine the package command based on build type
62
+ if [[ "${{ inputs.build_type }}" == "Release" ]]; then
63
+ ./gradlew packageReleaseDistributionForCurrentOS
64
+ else
65
+ ./gradlew packageDistributionForCurrentOS
66
+ fi
67
+
68
+ - name : Collect Windows Paths
69
+ if : matrix.os == 'windows-latest'
70
+ id : collect-windows
71
+ shell : bash
72
+ run : |
73
+ # Find Windows executables and installers
74
+ windows_exec=$(find . -path "**/*.exe" | grep -E "windows|win" | head -n 1)
75
+ windows_inst=$(find . -path "**/*.msi" | grep -E "windows|win" | head -n 1)
76
+
77
+ # Output Windows paths
78
+ echo "windows_exec=${windows_exec}" >> $GITHUB_ENV
79
+ echo "windows_inst=${windows_inst}" >> $GITHUB_ENV
80
+
81
+ - name : Collect Linux Paths
82
+ if : matrix.os == 'ubuntu-latest'
83
+ id : collect-linux
84
+ shell : bash
85
+ run : |
86
+ # Find Linux package
87
+ linux_app=$(find . -path "**/*.deb" | head -n 1)
88
+
89
+ # Output Linux paths
90
+ echo "linux_app=${linux_app}" >> $GITHUB_ENV
91
+
92
+ - name : Collect MacOS Paths
93
+ if : matrix.os == 'macos-latest'
94
+ id : collect-macos
95
+ shell : bash
96
+ run : |
97
+ # Find MacOS package
98
+ macos_app=$(find . -path "**/*.dmg" | head -n 1)
99
+
100
+ # Output MacOS paths
101
+ echo "macos_app=${macos_app}" >> $GITHUB_ENV
64
102
65
103
# Upload Windows executables and installers
66
104
- name : Upload Windows Apps
@@ -86,19 +124,4 @@ runs:
86
124
uses : actions/upload-artifact@v4
87
125
with :
88
126
name : MacOS-App
89
- path : ' **/*.dmg'
90
-
91
- - name : Publish Windows App
92
- if : matrix.os == 'windows-latest'
93
- shell : bash
94
- run : echo "Publishing Windows Desktop App"
95
-
96
- - name : Publish Linux App
97
- if : matrix.os == 'ubuntu-latest'
98
- shell : bash
99
- run : echo "Publishing Linux Desktop App"
100
-
101
- - name : Publish MacOS App
102
- if : matrix.os == 'macos-latest'
103
- shell : bash
104
- run : echo "Publishing MacOS Desktop App"
127
+ path : ' **/*.dmg'
0 commit comments