def upload_binary
      UI.message("Uploading binary to App Store Connect")
      if options[:ipa]
        package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate(
          app_id: options[:app].apple_id,
          ipa_path: options[:ipa],
          package_path: "/tmp",
          platform: options[:platform]
        )
      elsif options[:pkg]
        package_path = FastlaneCore::PkgUploadPackageBuilder.new.generate(
          app_id: options[:app].apple_id,
          pkg_path: options[:pkg],
          package_path: "/tmp",
          platform: options[:platform]
        )
      end

      transporter = transporter_for_selected_team
      result = transporter.upload(options[:app].apple_id, package_path)
      UI.user_error!("Could not upload binary to App Store Connect. Check out the error above", show_github_issues: true) unless result
    end
def upload_binary
      UI.message("Uploading binary to App Store Connect")
      if options[:ipa]
        package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate(
          app_id: options[:app].apple_id,
          ipa_path: options[:ipa],
          package_path: "/tmp",
          platform: options[:platform]
        )
      elsif options[:pkg]
        package_path = FastlaneCore::PkgUploadPackageBuilder.new.generate(
          app_id: options[:app].apple_id,
          pkg_path: options[:pkg],
          package_path: "/tmp",
          platform: options[:platform]
        )
      end

      transporter = transporter_for_selected_team
      result = transporter.upload(options[:app].apple_id, package_path)
      UI.user_error!("Could not upload binary to App Store Connect. Check out the error above", show_github_issues: true) unless result
    end
Upload the binary to App Store Connect