[IMPROVEMENT]: Add macOS binary to GitHub Releases#2274
Open
x15sr71 wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In raising this pull request, I confirm the following (please check boxes):
Reason for this PR:
Sanity check:
Repro instructions:
This PR only changes CI/release automation and does not modify CCExtractor’s runtime behaviour.
Summary
This PR updates the macOS CI workflow so that the existing
build_mac.ymljob not only builds and uploads a CI artifact, but also attaches the macOS binary to GitHub Releases when a release is published. Today the main way to install CCExtractor on macOS is via Homebrew, or by building from source, and there is no official macOS binary on the Releases page.GitHub Releases currently include Windows installers/portable zips and multiple Linux artifacts, but no macOS binary, even though the mac workflow already builds
./mac/ccextractorand uploads it as a workflow artifact. This PR closes that gap.What this PR changes
release: types: [published]trigger tobuild_mac.ymlso the macOS workflow also runs when a release is published.build_shelljob that, on release events, names the binaryccextractor-<version>-macosand attaches it to the GitHub Release using the samesoftprops/action-gh-releasepattern as the AppImage and .deb workflows. On non-release runs the version falls back to reading fromsrc/lib_ccx/lib_ccx.h.Behaviour / user impact
On pushes and pull requests:
Behaviour is unchanged. The macOS workflow continues to build and upload a CI artifact named
CCExtractor mac build. The new upload step is skipped.On release events (
types: [published]):The existing
build_shelljob builds./mac/ccextractor, copies it into./mac/artifacts, and uploads it as a workflow artifact (as today). The new step then attaches./mac/artifacts/ccextractor-<version>-macos(for exampleccextractor-0.96.6-macos) to the GitHub Release that triggered the workflow.As a result, future GitHub Releases will also include a downloadable macOS binary alongside the existing Windows and Linux artifacts, instead of macOS users having to fetch a transient CI artifact or build from source.
Testing
CCExtractor mac buildartifact from a successful "Build CCExtractor on Mac" workflow run../ccextractor --versionon macOS../ccextractor --versionruns successfully.This demonstrates that
build_mac.ymlalready produces a working./mac/ccextractorbinary at the expected path; this PR only wires that existing binary into GitHub Releases. On a push run, the CI artifact is also renamed toccextractor-<version>-macosusing sed to parse the version fromsrc/lib_ccx/lib_ccx.h;grep -oPis not used, as it is Linux‑only and would silently fail on macOS runners.On the CI side, the new upload step reuses the same condition and
action-gh-releaseconfiguration as the existing Linux packaging workflows, just pointing at the macOS artifact, so the behaviour is consistent with what already runs for AppImage and.deb.Notes / limitations
The macOS binary uploaded by this workflow is not signed or notarized, so macOS will show the usual Gatekeeper warning for binaries from an unidentified developer on first run. Users can still run it via the standard “Right‑click → Open → Open” flow and then allow it under System Settings → Privacy & Security → Allow Anyway.
This PR intentionally does not attempt to introduce code signing or notarization; that would require an Apple Developer ID and a separate design discussion.