Skip to content

Commit aefc9f9

Browse files
committed
Added play store deploy in github action
1 parent 1d7464a commit aefc9f9

File tree

5 files changed

+25
-15
lines changed

5 files changed

+25
-15
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,17 @@ jobs:
142142
artifacts: "app/build/app/outputs/apk/release/app-release.apk,app/build/app/outputs/bundle/release/app-release.aab"
143143
token: ${{ secrets.TOKEN }}
144144
allowUpdates: true
145+
146+
- name: Upload app bundle to Google Play
147+
uses: r0adkll/upload-google-play@v1
148+
with:
149+
serviceAccountJson: "app/service-account.json"
150+
packageName: "com.onemdev.flutter_ui_challenges"
151+
releaseFile: app/build/app/outputs/bundle/release/app-release.aab
152+
track: "beta"
153+
inAppUpdatePriority: 3
154+
status: completed
155+
145156
- uses: actions/upload-artifact@v4
146157
with:
147158
name: "app-release.aab"

android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ if (prodStoreFile.exists()) {
2323

2424

2525
android {
26-
namespace "com.example.flutter_uis"
26+
namespace "com.onemdev.flutter_ui_challenges"
2727
compileSdk 35
2828
ndkVersion '27.2.12479018'
2929

android/app/src/main/kotlin/com/example/flutter_uis/MainActivity.kt

Lines changed: 0 additions & 5 deletions
This file was deleted.

android/app/src/main/kotlin/com/onemdev/flutter_uis/MainActivity.kt renamed to android/app/src/main/kotlin/com/onemdev/flutter_ui_challenges/MainActivity.kt

File renamed without changes.

scripts/keys-n-stuff.dart

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Future<void> main() async {
3333
final String projectDir = config['dir'];
3434
final String projectType = config['type'];
3535
final String repo = config['repo'];
36+
final source = ".keys-n-stuff/$projectDir";
3637

3738
print('Project directory: $projectDir');
3839
print('Project type: $projectType');
@@ -66,26 +67,29 @@ Future<void> main() async {
6667

6768
// Copy Firebase config files
6869
// Android
69-
await copyFile('.keys-n-stuff/$projectDir/google-services.json',
70-
'android/app/google-services.json');
70+
await copyFile(
71+
'$source/google-services.json', 'android/app/google-services.json');
7172

7273
// iOS
73-
await copyFile('.keys-n-stuff/$projectDir/GoogleService-Info.plist',
74+
await copyFile('$source/GoogleService-Info.plist',
7475
'ios/Runner/GoogleService-Info.plist');
7576

7677
// macOS
77-
await copyFile('.keys-n-stuff/$projectDir/GoogleService-Info.plist',
78+
await copyFile('$source/GoogleService-Info.plist',
7879
'macos/Runner/GoogleService-Info.plist');
7980

8081
// Copy keystore properties file to android root
81-
await copyFile('.keys-n-stuff/$projectDir/prod.properties',
82-
'android/prod.properties');
82+
await copyFile('$source/prod.properties', 'android/prod.properties');
8383

8484
// Copy keystore file to android/app
85-
final keystoreFile = File('.keys-n-stuff/$projectDir/prod.jks');
85+
final keystoreFile = File('$source/prod.jks');
8686
if (await keystoreFile.exists()) {
87-
await copyFile(
88-
'.keys-n-stuff/$projectDir/prod.jks', 'android/app/prod.jks');
87+
await copyFile('$source/prod.jks', 'android/app/prod.jks');
88+
}
89+
90+
final serviceAccountFile = File('$source/service-account.json');
91+
if (await serviceAccountFile.exists()) {
92+
await copyFile('$source/service-account.json', 'service-account.json');
8993
}
9094

9195
print(

0 commit comments

Comments
 (0)