From c376651ba59f52ebe79fdb31586cc125c431252c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pedersen?= Date: Sun, 4 Aug 2024 14:04:21 +0200 Subject: [PATCH 01/10] Added binary release-key.jks for android app --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 587c567..b403237 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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' From d7927e66bd5018553e545c609b8546aa15f3ff5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pedersen?= Date: Sun, 4 Aug 2024 14:06:57 +0200 Subject: [PATCH 02/10] Updated APK build CI to sign apk --- .github/workflows/build_APK.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_APK.yml b/.github/workflows/build_APK.yml index 0fe47ef..2ef0153 100644 --- a/.github/workflows/build_APK.yml +++ b/.github/workflows/build_APK.yml @@ -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 From 29190a29b0ed0054147db545bdc2952242614d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pedersen?= Date: Sun, 4 Aug 2024 14:14:33 +0200 Subject: [PATCH 03/10] Configure build sign in gradle --- android/app/build.gradle | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index a8bc438..ffe0c4a 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -48,7 +48,11 @@ android { 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.debug + storeFile file('release-key.jks' + storePassword "$System.env.KEY_PASSWORD" + keyAlias 'upload' + keyPassword "$System.env.ALIAS_PASSWORD" } } } From c852aa053c7b087cb6bb2908539471f012f2ca83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pedersen?= Date: Sun, 4 Aug 2024 14:16:47 +0200 Subject: [PATCH 04/10] Bump version number and code for test --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index b403237..ee0206e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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+2 +version: 0.1.6+3 environment: sdk: '>=3.4.3 <4.0.0' From ee16593e2871e1fb20f488dfe87057fc68a1d92f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pedersen?= Date: Sun, 4 Aug 2024 14:17:11 +0200 Subject: [PATCH 05/10] Another test version bump --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index ee0206e..8ed3603 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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.6+3 +version: 0.1.7+4 environment: sdk: '>=3.4.3 <4.0.0' From e5b2023f4e3e5e01dbaad0c3d9c1b2c2e4ce567b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pedersen?= Date: Sun, 4 Aug 2024 14:21:32 +0200 Subject: [PATCH 06/10] Typofix in gradle build --- android/app/build.gradle | 2 +- pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index ffe0c4a..666bc4f 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -49,7 +49,7 @@ android { // 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 - storeFile file('release-key.jks' + storeFile file('release-key.jks') storePassword "$System.env.KEY_PASSWORD" keyAlias 'upload' keyPassword "$System.env.ALIAS_PASSWORD" diff --git a/pubspec.yaml b/pubspec.yaml index 8ed3603..ee0206e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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.7+4 +version: 0.1.6+3 environment: sdk: '>=3.4.3 <4.0.0' From f86224fbac3113e543d7ddb92aaea9b4a7286065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pedersen?= Date: Sun, 4 Aug 2024 14:27:55 +0200 Subject: [PATCH 07/10] Move signingConfigs outside buildTypes block --- android/app/build.gradle | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 666bc4f..9872fbd 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -44,15 +44,21 @@ android { versionName = flutterVersionName } - buildTypes { + signingConfigs { 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 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.release } } } From 662cc2c9e8868c8b7e880a3cfee8b43ee8085db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pedersen?= Date: Sun, 4 Aug 2024 14:31:16 +0200 Subject: [PATCH 08/10] Bump version for signed test --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index ee0206e..8ed3603 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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.6+3 +version: 0.1.7+4 environment: sdk: '>=3.4.3 <4.0.0' From 39bb73e3ac88905ee4e6e3169f8f961e85c3f50c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pedersen?= Date: Sun, 4 Aug 2024 14:36:30 +0200 Subject: [PATCH 09/10] Bump v0.1.5+2 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 8ed3603..b403237 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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.7+4 +version: 0.1.5+2 environment: sdk: '>=3.4.3 <4.0.0' From a853e718e4cfe1f970bfb59a363fe55aac08f677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pedersen?= Date: Sun, 4 Aug 2024 14:37:30 +0200 Subject: [PATCH 10/10] Update release APK job --- .github/workflows/create_release.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index b936586..03e2b38 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -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