Build(deps): Bump org.jetbrains.kotlin.plugin.compose from 2.1.20 to 2.1.21 #288
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: Build Release App Bundle | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| build-type: | |
| type: choice | |
| description: Build Type | |
| options: | |
| - debug | |
| - release | |
| workflow_call: | |
| inputs: | |
| build-type: | |
| required: false | |
| type: string | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| - test | |
| env: | |
| BUILD_TYPE: ${{ inputs.build-type || 'debug' }} | |
| APK_DIR: app/build/outputs/apk | |
| APK_NAME: VolumeKeyTrackControlModule | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Make gradlew executable | |
| run: chmod +x ./gradlew | |
| - name: Generate version | |
| run: ./gradlew getVersion | |
| - name: Set environment variables | |
| run: | | |
| echo "VERSION=$(cat app/build/version.txt)" >> $GITHUB_ENV | |
| if [[ "${{ env.BUILD_TYPE }}" == 'debug' ]]; then | |
| echo "ASSEMBLE_TYPE=assembleDebug" >> "$GITHUB_ENV" | |
| else | |
| echo "ASSEMBLE_TYPE=assembleRelease" >> "$GITHUB_ENV" | |
| fi | |
| - name: Print env variables | |
| run: | | |
| echo 'BUILD_TYPE: ${{ env.BUILD_TYPE }}' | |
| echo 'ASSEMBLE_TYPE: ${{ env.ASSEMBLE_TYPE }}' | |
| echo 'VERSION: ${{ env.VERSION }}' | |
| - name: Build APK | |
| run: ./gradlew app:${{ env.ASSEMBLE_TYPE }} | |
| - name: Rename release apk | |
| if: ${{ env.BUILD_TYPE == 'release' }} | |
| run: mv ${{ env.APK_DIR }}/${{ env.BUILD_TYPE }}/app-release-unsigned.apk ${{ env.APK_DIR }}/${{ env.BUILD_TYPE }}/app-${{ env.BUILD_TYPE }}.apk | |
| - name: Sign app APK | |
| uses: kevin-david/zipalign-sign-android-release@main | |
| id: sign_app | |
| with: | |
| releaseDirectory: ${{ env.APK_DIR }}/${{ env.BUILD_TYPE }} | |
| signingKeyBase64: ${{ secrets.KEYSTORE }} | |
| alias: ${{ secrets.KEY_ALIAS }} | |
| keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }} | |
| keyPassword: ${{ secrets.KEY_PASSWORD }} | |
| - name: Rename | |
| run: mv ${{ env.APK_DIR }}/${{ env.BUILD_TYPE }}/app-${{ env.BUILD_TYPE }}-signed.apk ${{ env.APK_NAME }}-${{ env.BUILD_TYPE }}-${{ env.VERSION }}.apk | |
| - name: Upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Build Artifacts | |
| path: ${{ env.APK_NAME }}-${{ env.BUILD_TYPE }}-${{ env.VERSION }}.apk |