Skip to content

Commit

Permalink
Merge pull request #55 from andreped:sign-apk
Browse files Browse the repository at this point in the history
Added apk signing for android; updated CIs; bump v0.1.5
  • Loading branch information
andreped authored Aug 4, 2024
2 parents 2d4190c + a853e71 commit bff0284
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 11 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build_APK.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@ jobs:
uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.2'


- name: Configure build
run: flutter clean && flutter pub get

- name: Build APK
run: |
cd ./
flutter pub get
flutter build apk --release
env:
KEY_JKS: ${{ secrets.KEY_JKS }}
KEY_PASSWORD: ${{ secrets.ALIAS_PASSWORD }}
ALIAS_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: base64 -d <<< $KEY_JKS > ./android/app/release-key.jks && flutter build apk --release -v

- name: Upload APK
uses: actions/upload-artifact@v2
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@ jobs:
with:
flutter-version: '3.22.2'

- name: Configure build
run: flutter clean && flutter pub get

- name: Build APK
run: |
cd ./
flutter pub get
flutter build apk --release
env:
KEY_JKS: ${{ secrets.KEY_JKS }}
KEY_PASSWORD: ${{ secrets.ALIAS_PASSWORD }}
ALIAS_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: base64 -d <<< $KEY_JKS > ./android/app/release-key.jks && flutter build apk --release -v

- name: Upload APK
uses: actions/upload-artifact@v2
Expand Down
12 changes: 11 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,21 @@ android {
versionName = flutterVersionName
}

signingConfigs {
release {
storeFile file('release-key.jks')
storePassword "$System.env.KEY_PASSWORD"
keyAlias 'upload'
keyPassword "$System.env.ALIAS_PASSWORD"

}
}

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
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 0.1.5+1
version: 0.1.5+2

environment:
sdk: '>=3.4.3 <4.0.0'
Expand Down

0 comments on commit bff0284

Please sign in to comment.