Skip to content

Commit

Permalink
Test Android Deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobkoerber committed Dec 19, 2023
1 parent 01f259d commit 9878b15
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/deploy_beta.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
name: Deploy Beta to TestFlight and Play Store

on:
release:
types: [ published ]
push:
branches:
- android-workflow

jobs:
deploy:
if: "github.event.release.prerelease"
# if: "github.event.release.prerelease"
runs-on: macos-latest

strategy:
matrix:
platform: [ ios, android ]
platform: [ android ] #ios, android ]
fail-fast: false

steps:
Expand Down
11 changes: 4 additions & 7 deletions android/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ platform :android do
)
end


lane :android_beta do
build_number = latest_google_play_version_code

Expand All @@ -21,27 +20,25 @@ platform :android do
upload_to_play_store(
json_key_data: Base64.strict_decode64(ENV["GOOGLE_PLAY_SERVICE_ACCOUNT_KEY"]),
aab: "../build/app/outputs/bundle/release/app-release.aab",
track: "beta",
track: "internal",
release_status: "draft",
)
end

def latest_google_play_version_code
json_key_data = Base64.strict_decode64(ENV["GOOGLE_PLAY_SERVICE_ACCOUNT_KEY"])
# productionVersionCodes = google_play_track_version_codes(track: 'production', json_key_data: json_key_data)
productionVersionCodes = google_play_track_version_codes(track: 'production', json_key_data: json_key_data)
betaVersionCodes = google_play_track_version_codes(track: 'beta', json_key_data: json_key_data)
# alphaVersionCodes = google_play_track_version_codes(track: 'alpha', json_key_data: json_key_data)
internalVersionCodes = google_play_track_version_codes(track: 'internal', json_key_data: json_key_data)

# puts version codes from all tracks into the same array
versionCodes = [
# productionVersionCodes,
productionVersionCodes,
betaVersionCodes,
# alphaVersionCodes,
internalVersionCodes
].reduce([], :concat)

# returns the highest version code from array
return versionCodes.max+1
return 1000
end
end
8 changes: 3 additions & 5 deletions lib/firebase_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class DefaultFirebaseOptions {

static const FirebaseOptions android = FirebaseOptions(
apiKey: 'AIzaSyD917lW3Y2-x8UiWfUdzKDnI1iO7Qt7Z5s',
appId: '1:944892355389:android:510d92307b08a9c352db54',
appId: '1:944892355389:android:3fec122c5eb51ef4',
messagingSenderId: '944892355389',
projectId: 'tca-backend-0001',
databaseURL: 'https://tca-backend-0001.firebaseio.com',
Expand All @@ -65,10 +65,8 @@ class DefaultFirebaseOptions {
projectId: 'tca-backend-0001',
databaseURL: 'https://tca-backend-0001.firebaseio.com',
storageBucket: 'tca-backend-0001.appspot.com',
androidClientId:
'944892355389-jat7kf35dqlvc2uvlsh3vbuq8ge6s6s5.apps.googleusercontent.com',
iosClientId:
'944892355389-qfnnv8c4344dk8ka4904ue35rclf3ipg.apps.googleusercontent.com',
androidClientId: '944892355389-jat7kf35dqlvc2uvlsh3vbuq8ge6s6s5.apps.googleusercontent.com',
iosClientId: '944892355389-qfnnv8c4344dk8ka4904ue35rclf3ipg.apps.googleusercontent.com',
iosBundleId: 'de.tum.tca',
);
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: campus_flutter
description: A new Flutter project.
publish_to: 'none'
version: 0.4.0
version: 4.4.0

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

0 comments on commit 9878b15

Please sign in to comment.