Skip to content

Commit

Permalink
release config
Browse files Browse the repository at this point in the history
  • Loading branch information
ueman committed Aug 27, 2024
1 parent 06f4793 commit 60a56f8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
34 changes: 14 additions & 20 deletions .github/workflows/build_app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,21 @@ jobs:
with:
channel: 'stable'
flutter-version-file: app/pubspec.yaml
# write key.properties
#- run: echo "$KEY_PROPERTIES" > android/key.properties
# env:
# KEY_PROPERTIES: ${{ secrets.key_properties }}
# write key.keystore
#- run: mkdir android/key
#- run: echo "$KEY_KEYSTORE" | base64 --decode > android/key/key.keystore
# env:
# KEY_KEYSTORE: ${{ secrets.key_keystore }}
- run: flutter pub get
- run: flutter analyze .
#- run: flutter build apk --build-number $GITHUB_RUN_NUMBER
- run: flutter build apk --build-number ${{ inputs.buildNumber }} --build-name ${{ inputs.versionName }}
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
- name: Decode Keystore
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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:
name: App Release ${{ inputs.versionName }}-${{ inputs.buildNumber }}
tag_name: app-${{ inputs.buildNumber }}
draft: false
prerelease: true
files: ./app/build/app/outputs/apk/release/app-release.apk
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: dev.uekoetter.passkit
releaseFiles: ./app/build/app/outputs/aab/release/app-release.aab
track: production
9 changes: 9 additions & 0 deletions app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ android {
versionName flutterVersionName
}

signingConfigs {
release {
storeFile file("keystore.jks")
storePassword System.getenv("KEYSTORE_PASSWORD")
keyAlias "cards_keystore"
keyPassword System.getenv("KEY_PASSWORD")
}
}

buildTypes {
release {
signingConfig signingConfigs.debug
Expand Down

0 comments on commit 60a56f8

Please sign in to comment.