-
Notifications
You must be signed in to change notification settings - Fork 232
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
Add GitHub Actions workflows to attach release assets. Fix #427 #616
base: main
Are you sure you want to change the base?
Add GitHub Actions workflows to attach release assets. Fix #427 #616
Conversation
…not working on MacOS
because past tags have varied
Otherwise the directory structure was zipped too
The other was only working for Ubuntu.
This was copied from a WordPress plugin!
I appreciate the effort here, but I believe this repository (and many of Apple's Swift repositories) doesn't have Github Actions enabled (the Actions tab is hidden at the top). I'd prefer to get swift-ci triggers working directly in this repository, since I currently have to use a fake paired PR in swift-syntax to kickstart it (@shahmishal @ahoppen). I'm not personally privy to the policy decisions around which repositories have Github actions and which don't (the only one I know of without checking is swift-protobuf), but since swift-format is integrated into toolchain builds, at a minimum we do need swift-ci to ensure that swift-format doesn't break any other components. Once we have that, even if we could use Github actions for other things, I don't know if having to maintain both kinds of checks would be worth the effort. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BrianHenryIE, thank you for putting these together! I've had a similar itch + formatting #610.
Similar conversations re: GitHub Actions in apple/swift-org-website
: swiftlang/swift-org-website#217 (comment). Most other Apple repos use @swift-ci.
Oh, it never occurred to me to check!
For the general lint CI step, I think it is valuable to have GitHub Actions running here as documentation for other projects to copy. For this particular issue, the assets will need to be attached to the release via some GitHub API, so this might be an easy option. I presume to fix the unverified developer warning, a private key would have to be uploaded to GitHub Actions Secrets, and it's probably preferred to keep that inside Apple infrastructure. I'll take a look at @swift-ci and see what I can learn. I had been planning to write another Action to automatically update the version number (as done in this PR, additionally in the README) and commit to main on new releases. |
Can Xcode Cloud be used to build the binary and notarize it? It could be a simpler and more secure way to do it and post the release binaries elsewhere when the Xcode cloud ends. @natikgadzhi |
Adds two GitHub Actions workflows, one running MacOS and the other Ubuntu, triggered by new releases, each of which updates the version number and runs
swift build --disable-sandbox -c release
, zips the file and attaches it to the release.I'm not sure why it uses
--disable-sandbox
, I copied that from Iron-Ham/swift-format-linter-action but maybe it's unnecessary?The MacOS asset also contains
disable-codesigning.sh
which contains the commandxattr -c swift-format
because otherwise :While I say fixes #427, rather than trigger on tag, this is triggered on release.
Main isn't building for me so I branched at 508.0.1 and tested on that: https://github.com/BrianHenryIE/swift-format/releases