Skip to content

Commit

Permalink
Add google service file
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-sneha-s committed Apr 4, 2024
1 parent 90f54d3 commit 49fb4b1
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 46 deletions.
29 changes: 7 additions & 22 deletions .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Analyze
name: Dart Format & Analyze

on: push

Expand All @@ -18,29 +18,14 @@ jobs:

- name: Install dependencies
run: |
cd khelo
flutter clean
flutter pub get
cd ../data
flutter clean
flutter pub get
cd ../style
flutter clean
flutter pub get
cd data && flutter clean && flutter pub get
cd ../style && flutter clean && flutter pub get
cd ../khelo && flutter clean && flutter pub get
cd ..
- name: Lint test
run: |
cd khelo
dart analyze --fatal-infos
cd ../data
dart analyze --fatal-infos
cd ../style
dart analyze --fatal-infos
cd data && flutter analyze --fatal-infos
cd ../style && flutter analyze --fatal-infos
cd ../khelo && flutter analyze --fatal-infos
cd ..
29 changes: 23 additions & 6 deletions .github/workflows/android_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Andriod Deploy
name: Publish to Google Play Store

on: workflow_dispatch
on: push

jobs:

deploy_internal_android:
build:
runs-on: ubuntu-latest

steps:
Expand All @@ -24,18 +24,35 @@ jobs:
channel: stable
cache: true



- name: Set up ruby env
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.2
bundle-cache: true

- name: Retrieve the secret and decode it to file
run: .github/script/install_secret_script.sh
env:
FIREBASE_OPTIONS_BASE64: ${{ secrets.FIREBASE_OPTIONS_BASE64 }}
GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}

run: |
cd khelo
echo $FIREBASE_OPTIONS_BASE64 | base64 -di > lib/firebase_options.dart
echo $GOOGLE_SERVICES_JSON_BASE64 | base64 -di > android/app/google-services.json
- name: Install Dependencies
run: |
cd data && flutter clean && flutter pub get
cd ../style && flutter clean && flutter pub get
cd ../khelo && flutter clean && flutter pub get
cd ..
- name: Deploy Internally
env:
APP_PLAY_SERVICE_JSON: ${{ secrets.APP_PLAY_SERVICE_JSON }}
APP_PLAY_SERVICE_JSON: ${{ secrets.APP_PLAY_SERVICE_JSON_BASE64 }}
APKSIGN_KEYSTORE_BASE64: ${{ secrets.APKSIGN_KEYSTORE_BASE64 }}
APKSIGN_KEYSTORE_PASS: ${{ secrets.APKSIGN_KEYSTORE_PASS }}
APKSIGN_KEY_ALIAS: ${{ secrets.APKSIGN_KEY_ALIAS }}
Expand All @@ -52,7 +69,7 @@ jobs:
echo "Generating android build $buildName $buildNumber"
echo $APKSIGN_KEYSTORE_BASE64 | base64 -di > release.jks
export APKSIGN_KEYSTORE = `pwd`/release.jks
cd android
cd khelo/android
gem install bundler -v 2.4.22
bundle install
echo $APP_PAY_SERVICE_JSON > google_play_api_key.json
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/ios_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Publish to App Store Connect

on: push
on:
push:
branches:
- main
workflow_dispatch:


jobs:
build:
Expand Down
34 changes: 17 additions & 17 deletions khelo/android/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@
default_platform(:android)

platform :android do
desc "Runs all the tests"
lane :test do
gradle(task: "test")
end
desc "Submit a new Internal Build to Play Store"

desc "Submit a new Beta Build to Crashlytics Beta"
lane :beta do
gradle(task: "clean assembleRelease")
crashlytics

# sh "your_script.sh"
# You can also use other beta testing services here
end
lane :upload_internal do |options|

versionName = options[:versionName]
versionCode = options[:versionCode]
Dir.chdir "../.." do
sh("flutter", "build", "appbundle", "--release", "--build-number=#{versionCode}" ,"--build-name=#{versionName}") end
end

upload_to_play_store(
track: 'internal',
skip_upload_metadata: true,
skip_upload_images: true,
skip_upload_apk: true,
aab: '../build/app/outputs/bundle/release/app-release.aab',
skip_upload_screenshots: true)
end

desc "Deploy a new version to the Google Play"
lane :deploy do
gradle(task: "clean assembleRelease")
upload_to_play_store
end
end

0 comments on commit 49fb4b1

Please sign in to comment.