Fastfile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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
  18. setup_ci
  19. app_store_connect_api_key(
  20. key_id: ENV["APP_STORE_CONNECT_API_KEY_KEY_ID"],
  21. issuer_id: ENV["APP_STORE_CONNECT_API_KEY_ISSUER_ID"],
  22. key_filepath: ENV["APP_STORE_CONNECT_API_KEY_KEY_FILEPATH"],
  23. )
  24. sync_code_signing(
  25. type: "appstore",
  26. readonly: false
  27. )
  28. version_number = get_version_number(
  29. xcodeproj: "App.xcodeproj",
  30. target: "Logseq",
  31. )
  32. latest_build_number = latest_testflight_build_number(
  33. version: version_number,
  34. initial_build_number: 1,
  35. )
  36. build_number = increment_build_number(
  37. xcodeproj: "App.xcodeproj",
  38. build_number: latest_build_number + 1,
  39. )
  40. # Ref: https://docs.fastlane.tools/advanced/fastlane/#directory-behavior
  41. sh("../../../scripts/patch-xcode-project.sh")
  42. build_app(
  43. workspace: "App.xcworkspace",
  44. destination: "generic/platform=iOS",
  45. scheme: "Logseq",
  46. configuration: "Release",
  47. xcargs: "-allowProvisioningUpdates"
  48. )
  49. upload_to_testflight(
  50. skip_submission: true,
  51. skip_waiting_for_build_processing: true,
  52. )
  53. slack(message: "App Build (#{build_number}) successfully uploaded to TestFlight 🎉!")
  54. end
  55. end