manualbuild #18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |