ci: label-gated signed macOS test build for PRs#3244
Merged
Conversation
Add .github/workflows/pr-build-installer.yml. Applying the `build-installer` label to a same-repo PR packages apps/code as a signed (unnotarized) arm64 macOS .dmg/.zip, uploads it as a run artifact, and posts a sticky PR comment linking to the download. Rebuilds on each push while the label is present. Generated-By: PostHog Code Task-Id: 95ef6c10-a78d-4099-8606-789050d9b3e2
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
charlesvien
approved these changes
Jul 7, 2026
Contributor
|
Reviews (1): Last reviewed commit: "ci: add label-gated signed macOS test bu..." | Re-trigger Greptile |
Run the comment job on build success OR failure (skipping only when build-macos itself was skipped), and write a "build failed" update when the packaging job fails. Previously the comment job needed build-macos success, so a failed re-run left the prior "ready" comment pointing at artifacts from a different commit. Generated-By: PostHog Code Task-Id: 95ef6c10-a78d-4099-8606-789050d9b3e2
The comment job only calls the GitHub API to post/update a PR comment; it never checks out or reads repository files. Remove contents:read to follow least privilege. Generated-By: PostHog Code Task-Id: 95ef6c10-a78d-4099-8606-789050d9b3e2
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.
What
Adds
.github/workflows/pr-build-installer.yml— an on-demand workflow that produces a downloadable, signed macOS (Apple Silicon) test build for a PR.Applying the
build-installerlabel to a same-repo PR:apps/code(electron-vite build+electron-builder --mac --arm64), reusing the signed-packaging recipe fromcode-build-test.yml(S3 fonts, liquid-glass icon, code signing;SKIP_NOTARIZE=1)..dmg/-mac.zipas acode-macos-arm64run artifact (7-day retention).It rebuilds on each push while the label is present.
Why
Lets reviewers/dogfooders download and run a real build of a PR on their own Mac without checking out and building locally.
Design notes
workflow_dispatch, no run on every PR) — full signed packaging is heavy, so it runs only when explicitly requested.xattr -dr com.apple.quarantine) on first launch. Notarization stays in the tag release pipeline (code-release.yml).Prerequisite
The
build-installerlabel must exist in the repo:gh label create build-installer --description "Trigger a signed macOS test build on this PR" --color 0e8a16Testing
Because
pull_requestruns the workflow from the PR branch, this can be validated live by adding thebuild-installerlabel to this PR once the label exists.Created with PostHog Code