#OICI-7#OICI-8#OICI-5#OICI-19#OICI-14 #34
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: ${{ secrets.API_BASE_URL }} | ||
| app_name: | ||
| description: Application name | ||
| required: true | ||
| default: Policies Comores Dev | ||
| app_version: | ||
| description: Version of the application | ||
| required: true | ||
| default: 1.0.0 | ||
| release_tag: | ||
| description: Tag for application update | ||
| required: true | ||
| default: comores-dev | ||
| 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 | ||
| # Set Repository Name As Env Variable | ||
| - name: Set repository name as env variable | ||
| run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV | ||
| - name: Setup JDK 21 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '21' | ||
| 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 | ||
| # Create APK Debug | ||
| - name: Build project | ||
| run: ./gradlew assembleComoresDevDebug | ||
| 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 }} | ||
| # - name: Environment info | ||
| # run: | | ||
| # gradle --version | ||
| # Upload Artifact Build | ||
| - name: Upload APK file | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: app-comoresDev-debug | ||
| path: ./app/build/outputs/**/*.apk | ||
| overwrite: true | ||
| - name: Edit release ${{ github.event.inputs.release_tag }} | ||
| 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 }} | ||
| 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 | ||