LastAndroid5 Build Manually (Without signature) #1
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: LastAndroid5 Build Manually (Without signature) | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| google_services_json: | |
| description: "google-services.json (optional)" | |
| jobs: | |
| build-lastAndroid5: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: lastAndroid5 | |
| fetch-depth: 0 | |
| submodules: 'true' | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Write google-services.json | |
| env: | |
| DATA: ${{ github.event.inputs.google_services_json }} | |
| run: echo $DATA > app/google-services.json | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build apk | |
| run: ./gradlew assembleDefaultAlpha assembleDefaultDebug | |
| - name: Read alpha apk output metadata | |
| id: apk-meta-alpha | |
| uses: juliangruber/read-file-action@v1 | |
| with: | |
| path: app/build/outputs/apk/default/alpha/output-metadata.json | |
| - name: Read alpha debug apk output metadata | |
| id: apk-meta-alpha-debug | |
| uses: juliangruber/read-file-action@v1 | |
| with: | |
| path: app/build/outputs/apk/default/debug/output-metadata.json | |
| - name: Parse apk infos | |
| id: apk-infos | |
| run: | | |
| echo "alpha_info_version_code=${{ fromJson(steps.apk-meta-alpha.outputs.content).elements[0].versionCode }}" >> $GITHUB_ENV | |
| echo "alpha_info_version_name=${{ fromJson(steps.apk-meta-alpha.outputs.content).elements[0].versionName }}" >> $GITHUB_ENV | |
| echo "alpha_debug_info_version_code=${{ fromJson(steps.apk-meta-alpha-debug.outputs.content).elements[0].versionCode }}" >> $GITHUB_ENV | |
| echo "alpha_debug_info_version_name=${{ fromJson(steps.apk-meta-alpha-debug.outputs.content).elements[0].versionName }}" >> $GITHUB_ENV | |
| # upload artifacts default-debug | |
| - name: Archive default debug build artifacts (universal) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Default debug build artifact (universal) | |
| path: app/build/outputs/apk/default/debug/BV_${{ env.alpha_debug_info_version_code }}_${{ env.alpha_debug_info_version_name }}_default_universal.apk | |
| # upload artifacts default-alpha | |
| - name: Archive default alpha build mappings | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Default alpha build mappings | |
| path: app/build/outputs/mapping/defaultAlpha | |
| - name: Archive default alpha build artifacts (universal) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Default alpha build artifact (universal) | |
| path: app/build/outputs/apk/default/alpha/BV_${{ env.alpha_info_version_code }}_${{ env.alpha_info_version_name }}_default_universal.apk |