#OICI-7#OICI-8#OICI-5#OICI-19#OICI-14 #33
Workflow file for this run
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: ${{ env.API_BASE_URL }} | ||
| app_name: | ||
| description: Application name | ||
| required: true | ||
| default: ${env.APP_NAME} | ||
| app_version: | ||
| description: Version of the application | ||
| required: true | ||
| default: ${env.VERSION_NAME} | ||
| release_tag: | ||
| description: Tag for application update | ||
| required: true | ||
| default: ${env.RELEASE_TAG} | ||
| release_notes: | ||
| description: Release notes | ||
| required: false | ||
| default: Correction des bugs et amélioration des performances | ||
| # 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: 'temurin' | ||
| java-version: '17' | ||
| cache: 'gradle' | ||
| - uses: actions/cache@v4 | ||
| 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@v4 | ||
| 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 }} | ||
| - name: Grant execute permission for gradlew | ||
| run: chmod +x gradlew | ||
| - name: build | ||
| run: | | ||
| ./gradlew assembleComoresDevDebug --stacktrace | ||
| env: | ||
| API_BASE_URL: "${{ github.event.inputs.api_base_url }}" | ||
| app_name_policies: "${{ github.event.inputs.app_name }}" | ||
| release_tag: "${{ github.event.inputs.release_tag }}" | ||
| versionName: "${{ github.event.inputs.app_version }}" | ||
| - name: Environment info | ||
| run: | | ||
| gradle --version | ||
| - name: Edit existing comores release | ||
| uses: softprops/action-gh-release@v1 | ||
| with: | ||
| tag_name: ${{ github.event.inputs.release_tag }} # 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) | ||
| body: ${{ github.event.inputs.release_notes }} | ||
| draft: false | ||
| prerelease: false | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: app-comoresDev-debug.apk | ||
| path: ./releases/download/${{ github.event.inputs.release_tag }}/*.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 | ||