Closed liangwangcm closed 1 year ago
While I use
maierj/fastlane-action@v2.2.1
, rubybundle-cache
is still recommended?- uses: ruby/setup-ruby@v1 with: ruby-version: "2.7.2" bundler-cache: true # runs 'bundle install' and caches installed gems automatically
I'm not sure what you're inquiring about but I was having a similar bundle problem and after adding the lintOption under "buildTypes { release {..." of android/app/build.grade, this led which led to another issue with fastlane below: buildTypes { release { lintOptions { disable 'InvalidPackage' disable "Instantiatable" checkReleaseBuilds false abortOnError false } } }
I seem to have an issue with a fastlane error per this github_action_log via https://github.com/lessimp/lessimp_logs.git that remains although the service_account_key.json is present via the path it says that it's not, "Could not find service account json file at path '/home/runner/work/lessimp/lessimp/android/service_account_key.json'"
Here the issue tracker https://issuetracker.google.com/issues/234820023 as well as another follow-up from another filed issue with the flutter team - https://github.com/flutter/flutter/issues/105393
The scripts/decrypt_android_secrets.sh gpg --quiet --batch --yes --decrypt --passphrase="$ANDROID_KEYS_SECRET_PASSPHRASE" \ --output android/key_files.zip android/key_files.zip.gpg && cd android && jar xvf key_files.zip && cd - ls -d $PWD/android/*
The android.yml file on GitHub Actions: name: Playstore deployment on: push: branches:
build_android: name: Building Android runs-on: ubuntu-latest steps:
deploy_android: name: Deploying to playstore runs-on: ubuntu-latest needs: [build_android] steps:
Appfile:
json_key_file("service_account_key.json") package_name("com.android.app")
Fastfile:
default_platform(:android)
platform :android do desc "Runs all the tests" lane :test do gradle(task: "test") end
desc "Build" lane :build do gradle(task: "clean assembleRelease") end
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
desc "Deploy a new version to the Google Play" lane :closed_beta do begin gradle(task: "clean assembleRelease")
gradle(
task: "bundle",
build_type: 'Release'
)
upload_to_play_store(
track: 'beta',
aab: '../build/app/outputs/bundle/release/app-release.aab',
skip_upload_metadata: true,
skip_upload_images: true,
skip_upload_screenshots: true,
release_status: "draft",
version_code: flutter_version()["version_code"],
)
end
end end
lintOption seems to have suppressed ':app:validateSigningRelease' following the ':app:lintVitalRelease' problem. running the validate_play_store_json_key json_key has confirmed that there may be a ruby/bundle related issue as before - http://docs.fastlane.tools/getting-started/android/setup/#collect-your-google-credentials: % fastlane run validate_play_store_json_key json_key:/Users/DevAccount/StudioProjects/lessimp/android/service_account_key.json /Library/Ruby/Site/2.6.0/rubygems.rb:265:in find_spec_for_exe': can't find gem fastlane (>= 0.a) with executable fastlane (Gem::GemNotFoundException) from /Library/Ruby/Site/2.6.0/rubygems.rb:284:in activate_bin_path' from /usr/local/bin/fastlane:23:in `'
Running GitHub Action with Fastlane continues to err on finding the service_account_key.json file that is present because I can run it locally now after fixing my ruby issue with Chruby:
ken@Kens-MBP android % bundle exec fastlane run validate_play_store_json_key json_key:/Users/ken/documents/projects/lessimp/android/service_account_key.json [✔] 🚀 +------------------------+---------+-----------------+ | Used plugins | +------------------------+---------+-----------------+ | Plugin | Version | Action | +------------------------+---------+-----------------+ | fastlane-plugin-flutt | 1.1.15 | flutter_version | | er_version | | | +------------------------+---------+-----------------+
17:58:30: --- Step: validate_play_store_json_key ---
+----------+--------------------------------------+ | Summary for validate_play_store_json_key | +----------+--------------------------------------+ | json_key | /Users/ken/documents/projects/lessi | | | mp/android/service_account_key.json | | timeout | 300 | +----------+--------------------------------------+
17:58:30: Successfully established connection to Google Play Store.
GitHub Action****
I find that when gpg is used to decrypt the .gpg file for the service_account_key.json to be set as an environment variable for json_key in the Actions filesystem., it does not unless I uncomment service_account_key.json from .gitignore
Please use new version v3.0.0 of this action in combination with bundler-cache: true
. Let me know in case there are any further issues.
While I use
maierj/fastlane-action@v2.2.1
, rubybundle-cache
is still recommended?