使用 fastlane 将 flutter macOS 应用上传到 TestFlight

问题描述 投票:0回答:1

我想使用 Github Actions 将 macOS 应用上传到 TestFlight。对于 iOS,我执行以下操作:

flutter build ipa --export-options-plist=${{ github.workspace }}/ios/exportOptions.plist

然后使用快速通道:

desc "Upload to TestFlight"
lane :distribute do
  upload_to_testflight(
    api_key: api_key,
    ipa: "../path/to/ipa",
    skip_waiting_for_build_processing: true
  )
end

我的问题是

flutter build macos
不会生成
.ipa
.pkg
,而是生成
.app
。我应该怎么做才能将 macOS 应用程序上传到 TestFlight?

ios flutter macos testflight fastlane
1个回答
0
投票

您需要做的第一件事是在此处创建并下载 Mac 安装程序分发证书:https://developer.apple.com/account/resources/certificates/add

然后需要使用

productbuild
使用
.pkg
生成的
.app
文件来创建
flutter build macos
文件:

productbuild \
    --sign "Mac Installer Distribution certificate" \
    --component path/to/App.app /Applications path/to/App.pkg

注意:

productbuild
的[install-path]参数必须为
/Applications
。否则,在尝试上传到 TestFlight 时,您会收到资产验证错误。

然后您可以使用

.pkg
上传
upload_to_testflight
文件:

desc "Upload to TestFlight"
lane :distribute do
  upload_to_testflight(
    api_key: "api_key",
    pkg: "path/to/App.pkg"
  )
end
© www.soinside.com 2019 - 2024. All rights reserved.