Flutter Build IPA在本地起作用,但在同一台计算机上的GitHub操作上运行时不行
我使用Flutter 3.0.0(也尝试了2.10.5)创建一个空的弹奏项目。
我可以构建它,在iPhone上运行它,然后从命令行存档应用程序。
通过github操作运行相同的命令时,我无法归档我的应用程序。
同一台机器作为一个自托管跑步者连接到github动作。
我使用Xcode 13.4,但也尝试了Xcode 13.0。
我在本地运行的命令和通过github操作是:flutter build ipa -target = lib/main.dart-release-obfuscate - split-debug-info -sbuild-number = $ {{github。 run_number}}} -v
在带有冗长的github操作上运行它时,这是输出: https: //paste.ee/p/erndz
如果您搜索“失败”,则第二次命中给出了这一点,这可能是一个提示:
Target release_unpack_ios failed: Exception: Failed to codesign /Users/john/Library/Developer/Xcode/DerivedData/Runner-bfrqxpkjfhgyupczrlqcnaiaydrh/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/Flutter.framework/Flutter with identity XXXXXXX
I create an empty flutter project using Flutter 3.0.0 (also tried 2.10.5).
I can build it, run it on my iPhone and archive the app from the command line.
When running the same commands through Github Actions Im unable to archive my app.
The same machine is hooked up to Github Actions as a self-hosted runner.
Im using XCode 13.4, but also tried XCode 13.0.
The command I run locally and through Github Actions is: flutter build ipa --target=lib/main.dart --release --obfuscate --split-debug-info --build-number=${{github.run_number}} -v
When running it on Github Actions with verbose turned on this is the output: https://paste.ee/p/ernDZ
If you search for "Failed", the second hit gives this and it might be a hint:
Target release_unpack_ios failed: Exception: Failed to codesign /Users/john/Library/Developer/Xcode/DerivedData/Runner-bfrqxpkjfhgyupczrlqcnaiaydrh/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/Flutter.framework/Flutter with identity XXXXXXX
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了原因。这是因为当使用GitHub Runner执行构建命令时,键链未解锁。因此,您需要首先解锁钥匙扣(在GitHub操作中使用步骤):
请参阅:
I found the reason. It is because when executing the build command using Github runner, the keychain is not unlocked. So you need to unlock the keychain (using a step in Github Actions) first:
See: