Fastfile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # This file contains the fastlane.tools configuration
  2. # You can find the documentation at https://docs.fastlane.tools
  3. #
  4. # For a list of all available actions, check out
  5. #
  6. # https://docs.fastlane.tools/actions
  7. #
  8. # For a list of all available plugins, check out
  9. #
  10. # https://docs.fastlane.tools/plugins/available-plugins
  11. #
  12. # Uncomment the line if you want fastlane to automatically update itself
  13. # update_fastlane
  14. default_platform(:ios)
  15. platform :ios do
  16. desc "Push a new beta build to TestFlight"
  17. lane :beta do | options |
  18. setup_ci
  19. version = options[:store_version_number]
  20. if !version.nil? && !version.empty?
  21. increment_version_number(version_number: version)
  22. end
  23. build = options[:build_number]
  24. if !build.nil? && !build.empty?
  25. increment_build_number(build_number: build.to_i)
  26. end
  27. run_id = ENV["GITHUB_RUN_ID"]
  28. if !run_id.nil? && !run_id.empty?
  29. set_info_plist_value(path: "./Bark/Info.plist", key: "GitHub Run Id", value: run_id)
  30. end
  31. match(type: "appstore", readonly: is_ci)
  32. build_app(workspace: "Bark.xcworkspace", scheme: "Bark")
  33. app_store_connect_api_key(
  34. key_id: "DX95H785DP",
  35. issuer_id: ENV["APP_STORE_CONNECT_ISSUER_ID"],
  36. key_content: ENV["APP_STORE_CONNECT_KEY_CONTENT"],
  37. duration: 1200, # optional (maximum 1200)
  38. in_house: false # optional but may be required if using match/sigh
  39. )
  40. upload_to_testflight
  41. bark_key = ENV["BARK_KEY"]
  42. %x( 'curl' 'https://api.day.app/#{bark_key}/Bark%20has%20completed%20processing?isArchive=0&url=https%3A%2F%2Fgithub.com%2FFinb%2FBark%2Factions%2Fruns%2F#{run_id}' )
  43. end
  44. lane :tests do
  45. run_tests(scheme: "Bark.xcworkspace", scheme: "Bark")
  46. end
  47. end