Skip to content

Commit

Permalink
✏️ Dynamic apk/aab naming
Browse files Browse the repository at this point in the history
  • Loading branch information
iqfareez committed Aug 10, 2023
1 parent 2bac555 commit 608f784
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_aab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Upload aab
uses: actions/upload-artifact@v3
with:
path: build/app/outputs/bundle/release/app-release.aab
path: build/app/outputs/bundle/release/*.aab

- name: Adding markdown
run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ jobs:
run: echo "${{ secrets.KEY_JKS }}" | base64 --decode > android/key.jks

- name: Build release appbundle
if: "!github.event.release.prerelease"
if: !github.event.release.prerelease
run: flutter build appbundle

- name: Upload aab
uses: actions/upload-artifact@v3
if: "!github.event.release.prerelease"
if: !github.event.release.prerelease
with:
name: app-release
path: build/app/outputs/bundle/release/app-release.aab
path: build/app/outputs/bundle/release/*.aab

- name: Adding markdown
if: "!github.event.release.prerelease"
if: !github.event.release.prerelease
run: |
echo :white_check_mark: Build appbundle **todo: Publish to Google Play** >> $GITHUB_STEP_SUMMARY
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
echo ":rocket: Added release apk(s) to assets" >> $GITHUB_STEP_SUMMARY
upload_google_play:
if: "!github.event.release.prerelease"
if: !github.event.release.prerelease
runs-on: ubuntu-latest
needs: build_android
steps:
Expand All @@ -97,7 +97,7 @@ jobs:
with:
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT }}
packageName: live.iqfareez.waktusolatmalaysia
releaseFiles: app-release.aab
releaseFiles: *.aab
track: production
status: draft

Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/build_apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,22 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: arm64-v8a artifact
path: build/app/outputs/apk/release/app-arm64-v8a-release.apk
path: build/app/outputs/apk/release/*-arm64-v8a-release.apk

- name: Upload artifacts (armeabi-v7a)
uses: actions/upload-artifact@v3
with:
name: armeabi-v7a artifact
path: build/app/outputs/apk/release/app-armeabi-v7a-release.apk
path: build/app/outputs/apk/release/*-armeabi-v7a-release.apk

- name: Upload artifacts (x86_64)
uses: actions/upload-artifact@v3
with:
name: x86_64 artifact
path: build/app/outputs/apk/release/app-x86_64-release.apk
path: build/app/outputs/apk/release/*-x86_64-release.apk

# The previous apk will be deleted when re-running the flutter build apk again
# So we don't need to worry about the glob pattern for the fat apk

- name: Build fat apk
run: |
Expand All @@ -80,7 +83,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: fat apk artifact
path: build/app/outputs/apk/release/app-release.apk
path: build/app/outputs/apk/release/*.apk

- name: Write summary
run: |
Expand Down
2 changes: 2 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ android {
versionName flutterVersionName
multiDexEnabled true
//TODO: Remove multidex when app support min 21 or higher

setProperty("archivesBaseName", "MPT-$flutterVersionName")
}

signingConfigs {
Expand Down

0 comments on commit 608f784

Please sign in to comment.