Skip to content

Commit

Permalink
Update CI_STORE_DEPLOY_ANDROID.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
BerkSpar authored Sep 22, 2024
1 parent fbea480 commit 26a0294
Showing 1 changed file with 17 additions and 26 deletions.
43 changes: 17 additions & 26 deletions .github/workflows/CI_STORE_DEPLOY_ANDROID.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,17 @@ jobs:
- name: 📉 Run all app tests
run: flutter test

build_aab:
name: Build AppBundle
deploy:
name: Deploy to Play Store
runs-on: ubuntu-latest
env:
JAVA_VERSION: 17.0
FLUTTER_VERSION: 3.24.3
AAB_PATH: build/app/outputs/bundle/release/app-release.aab
KEYSTORE_PATH: android/upload-keystore.jks
KEY_PROPS_PATH: android/key.properties
SERVICE_ACCOUNT_PATH: store_credentials.json
PACKAGE_NAME: tech.bunnie.hub_finder
needs: setup
steps:
- name: Checkout the code
Expand All @@ -75,29 +79,6 @@ jobs:
with:
flutter-version: ${{ env.FLUTTER_VERSION }}

- name: Build aab
run: flutter build appbundle

- name: Upload generated aab to the artifacts
uses: actions/upload-artifact@master
with:
name: aab-stores
path: ${{ env.AAB_PATH }}

deploy:
name: Deploy to Play Store
runs-on: ubuntu-latest
env:
AAB_PATH: build/app/outputs/bundle/release/app-release.aab
KEYSTORE_PATH: android/upload-keystore.jks
KEY_PROPS_PATH: android/key.properties
SERVICE_ACCOUNT_PATH: store_credentials.json
PACKAGE_NAME: tech.bunnie.hub_finder
needs: build_aab
steps:
- name: Checkout the code
uses: actions/checkout@v3

- name: Decode Android keystore
run: echo "${{ secrets.ANDROID_KEYSTORE }}" | base64 --decode > ${{ env.KEYSTORE_PATH }}

Expand All @@ -107,10 +88,20 @@ jobs:
- name: Decode Android Service Account
run: echo "${{ secrets.PRODUCTION_CREDENTIAL_FILE }}" | base64 --decode > ${{ env.SERVICE_ACCOUNT_PATH }}

- name: Build aab
run: flutter build appbundle

- name: Upload generated aab to the artifacts
uses: actions/upload-artifact@master
with:
name: aab-stores
path: ${{ env.AAB_PATH }}

- name: Deploy to Play Store (Internal testing)
uses: r0adkll/upload-google-play@v1
with:
# serviceAccountJson: ${{ env.SERVICE_ACCOUNT_PATH }}
serviceAccountJsonPlainText: '${{ secrets.SERVICE_ACCOUNT_JSON }}'
packageName: ${{ env.PACKAGE_NAME }}
releaseFiles: ${{ env.AAB_PATH }}
track: internal
track: production

0 comments on commit 26a0294

Please sign in to comment.