-
Notifications
You must be signed in to change notification settings - Fork 12
99 lines (87 loc) · 3.35 KB
/
manual.yml
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: Policies Manual
app_dir:
description: Name of the folder in Documents, default IMIS-CLI
required: false
application_id:
description: Fully qualified name of the app
required: true
default: org.openimis.imispolicies.cli
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
cli_assets_dir:
description: Asserts folder for images, json files.... Only works with .cli
required: false
# Branch is chosen by default in github manual actions
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-${{ github.event.inputs.application_id }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}
- uses: actions/cache@v2
with:
path: |
~/.android
key: ${{ runner.os }}-${{ github.event.inputs.application_id }}
- name: Environment info
run: |
gradle --version
echo url ${{ github.event.inputs.api_base_url }}
echo app name ${{ github.event.inputs.app_name }}
echo app dir ${{ github.event.inputs.app_dir }}
echo CLI_JAVA_DIR "${{ github.event.inputs.cli_java_dir }}"
echo CLI_RES_DIR "${{ github.event.inputs.cli_res_dir }}"
echo CLI_ASSETS_DIR "${{ github.event.inputs.cli_assets_dir }}"
echo APPLICATION_ID "${{ github.event.inputs.application_id }}"
- 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 }}"
CLI_ASSETS_DIR: "${{ github.event.inputs.cli_assets_dir }}"
APPLICATION_ID: "${{ github.event.inputs.application_id }}"
- name: Environment info
run: |
gradle --version
- uses: actions/upload-artifact@v2
with:
name: openimis-policies-apk-${{github.run_number}}-${{github.sha}}
path: ./app/build/outputs/**/*.apk
# - 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