Skip to content

Commit

Permalink
Update: v1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gokadzev committed Jun 22, 2022
1 parent 4c3d925 commit 3504007
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
on: workflow_dispatch
name: Test, Build and Release apk
env:
PROPERTIES_PATH: "./android/key.properties"
jobs:
build:
name: Build APK
Expand Down Expand Up @@ -27,6 +29,16 @@ jobs:
- uses: subosito/flutter-action@v2
with:
channel: "stable"

#
- run: |
echo keyPassword=\${{ secrets.KEY_STORE }} > ${{env.PROPERTIES_PATH}}
echo storePassword=\${{ secrets.KEY_PASSWORD }} >> ${{env.PROPERTIES_PATH}}
echo keyAlias=\${{ secrets.KEY_ALIAS }} >> ${{env.PROPERTIES_PATH}}
#
- run: echo "${{ secrets.KEYSTORE2 }}" | base64 --decode > android/app/key.jks

# Get flutter dependencies.
- run: flutter pub get
# Check for any formatting issues in the code.
Expand Down
20 changes: 19 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

android {
compileSdkVersion 32
ndkVersion flutter.ndkVersion
Expand Down Expand Up @@ -56,11 +62,23 @@ android {
versionName flutterVersionName
}

signingConfigs {
release {
//From decoded key
storeFile = file('key.jks')

//From key.properties
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storePassword keystoreProperties['storePassword']
}
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
shrinkResources false
}
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.6.0+9
version: 1.7.0+10

environment:
sdk: ">=2.17.3 <3.0.0"
Expand Down

0 comments on commit 3504007

Please sign in to comment.