Test, Build and Release apk #7
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
on: | |
workflow_dispatch: | |
inputs: | |
buildNumber: | |
description: 'Build Number' | |
required: true | |
type: string | |
versionName: | |
description: 'Version Name' | |
required: true | |
type: string | |
name: Test, Build and Release apk | |
permissions: | |
contents: write | |
jobs: | |
build: | |
defaults: | |
run: | |
working-directory: ./app | |
name: Build APK | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
flutter-version-file: app/pubspec.yaml | |
- run: flutter pub get | |
- run: flutter analyze . | |
- name: Decode Keystore | |
env: | |
ENCODED_KEYSTORE: ${{ secrets.KEYSTORE_BASE64 }} | |
DECODED_KEYSTORE_PATH: android/app/keystore.jks | |
run: | | |
echo $ENCODED_KEYSTORE > keystore_base64.txt | |
base64 -d keystore_base64.txt > $DECODED_KEYSTORE_PATH | |
#- run: flutter build apk --build-number $GITHUB_RUN_NUMBER | |
- run: flutter build aab --build-number ${{ inputs.buildNumber }} --build-name ${{ inputs.versionName }} | |
- name: Upload to Google Play | |
uses: r0adkll/upload-google-play@v1 | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }} | |
packageName: dev.uekoetter.passkit | |
releaseFiles: ./app/build/app/outputs/aab/release/app-release.aab | |
track: production |