forked from openimis/claims_android_app_java
-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (87 loc) · 3.19 KB
/
manual.yml
File metadata and controls
99 lines (87 loc) · 3.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: manualbuild
on:
workflow_dispatch:
inputs:
api_base_url:
description: URL of the REST API
required: true
default: https://release.openimis.org/rest/
app_name:
description: Display name of the application
required: false
default: Claims Manual
app_version:
description: Version of the application
required: true
default: v1.0.0
app_dir:
description: Name of the folder in Documents, default IMIS-CLI
required: false
application_id_suffix:
description: Display suffix of the app, like .mvDev or .bephaDev, defaults to .cli
required: false
cli_java_dir:
description: java source folder for custom functions. Only works with application_id_suffix .cli
required: false
cli_res_dir:
description: Resources folder for icons. Only works with application_id_suffix .cli
required: false
# Branch is chosen by default in github manual actions
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup JDK 17
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '17'
cache: 'gradle'
- name: Environment info
run: |
gradle --version
echo url ${{ github.event.inputs.api_base_url }}
echo app name ${{ github.event.inputs.app_name }}
- name: show gradlew permission
run: |
chmod +x gradlew
- name: build
run: |
./gradlew assembleCliDebug --stacktrace
env:
API_BASE_URL: "${{ github.event.inputs.api_base_url }}"
CLI_APP_NAME: "${{ github.event.inputs.app_name }}"
CLI_APP_DIR: "${{ github.event.inputs.app_dir }}"
CLI_JAVA_DIR: "${{ github.event.inputs.cli_java_dir }}"
CLI_RES_DIR: "${{ github.event.inputs.cli_res_dir }}"
APPLICATION_ID_SUFFIX: "${{ github.event.inputs.application_id_suffix }}"
- name: Environment info
run: |
gradle --version
# Run Tests Build
- name: Run gradle tests
run: ./gradlew testCliDebugUnitTest --stacktrace
- uses: actions/upload-artifact@v4
with:
name: openimis-claims-apk-${{github.run_number}}-${{github.sha}}
path: ./claimManagement/build/outputs/**/*.apk
#publish in release
- name: Edit release ${{ github.event.inputs.app_version }}
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.inputs.app_version }} # Sets the release tag to the pushed tag name (e.g., v1.0.0)
name: ${{ github.event.inputs.app_version }} # Sets the release name to the pushed tag name (e.g., Release v1.0.0)
files: ./app/build/outputs/**/*.apk
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: build
# run: |
# ./gradlew bundleDebug --stacktrace
#
# - uses: actions/upload-artifact@v2
# with:
# name: openimis-claims-aab-${{github.run_number}}-${{github.sha}}
# path: ./claimManagement/build/outputs/**/*.aab