Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译方式 #115

Closed
powenn opened this issue Dec 20, 2021 · 12 comments
Closed

编译方式 #115

powenn opened this issue Dec 20, 2021 · 12 comments

Comments

@powenn
Copy link
Contributor

powenn commented Dec 20, 2021

方式一:本地编译

  • 拉代码。
  • 在 SwiftPamphletAppConfig.swift 里 gitHubAccessToken 加入你的 GitHub Access Token。GitHub Access Token 在 Personal Access Tokens 这里获取。记得scope 勾上 repo 和 user。
  • 使用Xcode编译生成这个手册程序或是连点两下compile.command。

Xcode 和 macOS 都需要升到最新版。如果遇到 swift package 下载不下来的情况,参看这个议题来解决:Issue #88

方式二:云编译

无需 Xcode 设置开发人员帐号编译

  • 可使用 compile.command 编译手册程序,无需开启 Xcode 设置个人开发帐号,只需在 SwiftPamphletAppConfig.swift 里 gitHubAccessToken 加入你的 GitHub Access Token,完成后连点 compile.command 两下等待作业完成。
  • 或使用 Github action workflow 编译(感谢@powenn),无需在本地操作、也无需开启 Xcode 设置个人开发帐号,只需设置 personal access token(PAT) 在 repository 设定中 action secrets,并命名为 PAT。Fork 此 repository,设置 PAT,手动启用 action,等候约3分钟即可下载档案,往后专案更新时,只需 fetch and merge,action 会自动进行。

英文说明:
Requires storaging PAT to actions secrets and name it to PAT

  • Fork this repository.
  • Go to get a Personal Access Token(PAT) if you haven't done it yet.(GitHub Access Token in Personal Access Tokens,scope checked repo and user)
  • Set your token in action secrets ,and name it to PAT.
  • Get the compiled app package after Github action complete.

While project update ,you won't need to compile it manually in local, only need to fetch and merge commits and wait for about 3 minutes then download it

image
image

@ming1016 ming1016 pinned this issue Dec 20, 2021
@VictDog
Copy link

VictDog commented Jan 7, 2022

image
用Actions 也不行啊

@powenn
Copy link
Contributor Author

powenn commented Jan 7, 2022

image

用Actions 也不行啊

你沒設定PAT吧

@VictDog
Copy link

VictDog commented Jan 7, 2022

image
用Actions 也不行啊

你沒設定PAT吧

设置过了

@powenn
Copy link
Contributor Author

powenn commented Jan 7, 2022

image

用Actions 也不行啊

你沒設定PAT吧

设置过了

能讓我看看嗎,我剛看了自己的沒問題

@ming1016
Copy link
Owner

ming1016 commented Jan 7, 2022

@VictDog @powenn 我看好像是打成功了

@powenn
Copy link
Contributor Author

powenn commented Jan 7, 2022

@VictDog @powenn 我看好像是打成功了

??

@powenn
Copy link
Contributor Author

powenn commented Jan 7, 2022

@VictDog @powenn 我看好像是打成功了

??

我設定PAT設置為空時會退出
他那個只執行34秒,大概是設置錯誤或沒設置

@ming1016
Copy link
Owner

ming1016 commented Jan 7, 2022

@VictDog @powenn 我看好像是打成功了

??

@VictDog
Copy link

VictDog commented Jan 7, 2022

image

用Actions 也不行啊

你沒設定PAT吧

设置过了

能讓我看看嗎,我剛看了自己的沒問題

应该是之前没设置成功,后来又设置了一次编译成功了,忘记回复您了,谢谢了

@powenn
Copy link
Contributor Author

powenn commented Jan 7, 2022

@VictDog @powenn 我看好像是打成功了

??

瞭解了,我只看他傳的那個,那個確實是失敗的,因為剛fork 時還沒設置

@VictDog
Copy link

VictDog commented Jan 7, 2022

@VictDog @powenn 我看好像是打成功了

??

是的,之前没配置好,后来又设置了一次就编译成功了,忘记回复了,谢谢了

@xiiiiye
Copy link

xiiiiye commented Jul 1, 2022

The following build commands failed:
	CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'SwiftPamphletApp' from project 'SwiftPamphletApp')
	CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'SwiftPamphletApp' from project 'SwiftPamphletApp')
	CompileSwift normal arm64 (in target 'SwiftPamphletApp' from project 'SwiftPamphletApp')
(3 failures)
Error: Process completed with exit code 65.

编译出错, 我使用main和tag5.0 两个分支都试了一下, 都是上面这个报错提示

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants