Syaa'ban Hotfix #1 #35
Workflow file for this run
This file contains 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 all on release | |
on: | |
release: | |
types: [published] | |
jobs: | |
build_android: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Setup Java | |
uses: actions/[email protected] | |
with: | |
distribution: "zulu" | |
java-version: "11" | |
- name: Setup Flutter | |
uses: subosito/[email protected] | |
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 appbundle | |
if: "!github.event.release.prerelease" | |
run: flutter build appbundle | |
- name: Upload aab | |
uses: actions/upload-artifact@v3 | |
if: "!github.event.release.prerelease" | |
with: | |
name: aab-release | |
path: build/app/outputs/bundle/release/app-release.aab | |
- name: Adding markdown | |
if: "!github.event.release.prerelease" | |
run: | | |
echo :white_check_mark: Build appbundle **todo: Publish to Google Play** >> $GITHUB_STEP_SUMMARY | |
- 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@v3 | |
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 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
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@v1 | |
with: | |
files: "*.apk" | |
- name: Adding markdown | |
run: | | |
echo ":rocket: Added release apk(s) to assets" >> $GITHUB_STEP_SUMMARY | |
upload_google_play: | |
if: "!github.event.release.prerelease" | |
runs-on: ubuntu-latest | |
needs: build_android | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: aab-release | |
- name: Upload file to the assets release | |
uses: r0adkll/upload-google-play@v1 | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT }} | |
packageName: live.iqfareez.waktusolatmalaysia | |
releaseFiles: "*.aab" | |
track: production | |
status: draft | |
- name: Adding markdown | |
run: | | |
echo ":rocket: Uploaded to Google Play" >> $GITHUB_STEP_SUMMARY |