September Update #4
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: (Release) Build APK and upload to release assets | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| build_android_apk: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "zulu" | |
| java-version: "17" | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: "stable" | |
| # File can be encoded to base64 on https://base64.guru/converter/encode/file | |
| - name: Decoding android/key.properties | |
| run: echo "${{ secrets.KEY_PROP }}" | base64 --decode > android/key.properties | |
| - name: Decoding android/key.jks | |
| run: echo "${{ secrets.KEY_JKS }}" | base64 --decode > android/key.jks | |
| - name: Build release APK(s) per ABIs | |
| run: | | |
| flutter pub get | |
| flutter build apk --split-per-abi | |
| - name: Adding markdown | |
| run: | | |
| echo ":white_check_mark: Build split apk" >> $GITHUB_STEP_SUMMARY | |
| - name: Upload apks | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: apk-releases | |
| path: build/app/outputs/apk/release/*.apk | |
| - name: Adding markdown | |
| run: | | |
| echo ":blue_heart: Using **`flutter --version`**" >> $GITHUB_STEP_SUMMARY | |
| upload_assets: | |
| runs-on: ubuntu-latest | |
| needs: build_android_apk | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: apk-releases | |
| - name: Rename apk | |
| run: curl -s https://gist.githubusercontent.com/iqfareez/f57405016cc8bcc51cdcd2879c88807a/raw/5d9bbed7231a9e56bf24b88ab5286cee73dae173/rename_apk.sh | bash -s MPT . | |
| - name: Upload file to the assets release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: "*.apk" | |
| - name: Adding markdown | |
| run: | | |
| echo ":rocket: Added release apk(s) to assets" >> $GITHUB_STEP_SUMMARY |