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 ee22a5b commit fbea480
Showing 1 changed file with 25 additions and 16 deletions.
41 changes: 25 additions & 16 deletions .github/workflows/CI_STORE_DEPLOY_ANDROID.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,13 @@ jobs:
- name: 📉 Run all app tests
run: flutter test

deploy:
name: Deploy to Play Store
build_aab:
name: Build AppBundle
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 @@ -79,15 +75,6 @@ jobs:
with:
flutter-version: ${{ env.FLUTTER_VERSION }}

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

- name: Decode Android key properties
run: echo "${{ secrets.ANDROID_KEY_PROPERTIES }}" | base64 --decode > ${{ env.KEY_PROPS_PATH }}

- name: Decode Android Service Account
run: echo "${{ secrets.PRODUCTION_CREDENTIAL_FILE }}" | base64 --decode > ${{ env.SERVICE_ACCOUNT_PATH }}

- name: Build aab
run: flutter build appbundle

Expand All @@ -97,10 +84,32 @@ jobs:
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 }}

- name: Decode Android key properties
run: echo "${{ secrets.ANDROID_KEY_PROPERTIES }}" | base64 --decode > ${{ env.KEY_PROPS_PATH }}

- name: Decode Android Service Account
run: echo "${{ secrets.PRODUCTION_CREDENTIAL_FILE }}" | base64 --decode > ${{ env.SERVICE_ACCOUNT_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 }}
Expand Down

0 comments on commit fbea480

Please sign in to comment.