Skip to content

Commit 10e2cfe

Browse files
authored
Merge pull request #111 from mngoe/OP-2771
fix automatic & manual github actions
2 parents 1033076 + 94493c2 commit 10e2cfe

File tree

2 files changed

+30
-7
lines changed

2 files changed

+30
-7
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v5
16-
- name: Setup JDK 11
16+
- name: Setup JDK 17
1717
uses: actions/setup-java@v5
1818
with:
1919
distribution: 'zulu'
20-
java-version: '11'
20+
java-version: '17'
2121
cache: 'gradle'
2222

2323
- name: Environment info
@@ -36,6 +36,9 @@ jobs:
3636
run: |
3737
gradle --version
3838
39+
- name: Run gradle tests
40+
run: ./gradlew testDemoProdDebugUnitTest --stacktrace
41+
3942
- uses: actions/upload-artifact@v4
4043
with:
4144
name: openimis-claims-apk-${{github.run_number}}-${{github.sha}}

.github/workflows/manual.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
description: Display name of the application
1212
required: false
1313
default: Claims Manual
14+
app_version:
15+
description: Version of the application
16+
required: true
17+
default: v1.0.0
1418
app_dir:
1519
description: Name of the folder in Documents, default IMIS-CLI
1620
required: false
@@ -30,13 +34,13 @@ jobs:
3034
runs-on: ubuntu-latest
3135

3236
steps:
33-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v4
3438

35-
- name: Setup JDK 11
36-
uses: actions/setup-java@v2
39+
- name: Setup JDK 17
40+
uses: actions/setup-java@v5
3741
with:
38-
distribution: 'temurin'
39-
java-version: '11'
42+
distribution: 'zulu'
43+
java-version: '17'
4044
cache: 'gradle'
4145

4246
- name: Environment info
@@ -64,11 +68,27 @@ jobs:
6468
run: |
6569
gradle --version
6670
71+
# Run Tests Build
72+
- name: Run gradle tests
73+
run: ./gradlew testCliDebugUnitTest --stacktrace
74+
6775
- uses: actions/upload-artifact@v4
6876
with:
6977
name: openimis-claims-apk-${{github.run_number}}-${{github.sha}}
7078
path: ./claimManagement/build/outputs/**/*.apk
7179

80+
#publish in release
81+
- name: Edit release ${{ github.event.inputs.app_version }}
82+
uses: softprops/action-gh-release@v1
83+
with:
84+
tag_name: ${{ github.event.inputs.app_version }} # Sets the release tag to the pushed tag name (e.g., v1.0.0)
85+
name: ${{ github.event.inputs.app_version }} # Sets the release name to the pushed tag name (e.g., Release v1.0.0)
86+
files: ./app/build/outputs/**/*.apk
87+
draft: false
88+
prerelease: false
89+
env:
90+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91+
7292
# - name: build
7393
# run: |
7494
# ./gradlew bundleDebug --stacktrace

0 commit comments

Comments
 (0)