Skip to content

Commit

Permalink
try deploy on play store
Browse files Browse the repository at this point in the history
  • Loading branch information
felix1801 committed Sep 9, 2024
1 parent 79fe8ae commit 40c66fd
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/build-deploy-playstore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Flutter Build and Release AAB

on:
workflow_dispatch:

permissions:
contents: write
packages: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '17'

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'

- name: Get dependencies
run: flutter pub get

- name: Decode Keystore
run: |
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > android/app/keystore.jks
- name: Build AAB
env:
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
run: |
flutter build appbundle --release \
--build-number=${{ github.run_number }} \
--build-name=0.2.${{ github.run_number }}
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/bundle/release/app-release.aab"
tag: v0.2.${{ github.run_number }}
name: Release v0.2.${{ github.run_number }}
body: New release for version 0.2.${{ github.run_number }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Deploy to Google Play
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: com.felinx18.flasholator
releaseFiles: build/app/outputs/bundle/release/app-release.aab
track: Alpha
30 changes: 30 additions & 0 deletions .github/workflows/deploy-playstore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy AAB on playstore

on:
workflow_dispatch:

permissions:
contents: write
packages: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Download release AAB
uses: actions/download-artifact@v4
with:
name: release-aab
path: app-release.aab

- name: Deploy to Google Play
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: com.felinx18.flasholator
releaseFiles: app-release.aab
track: Alpha
status: completed

0 comments on commit 40c66fd

Please sign in to comment.