Skip to content

fix(ci): installer fixes — NSIS MUI2, YAML heredoc, macOS dark mode & Gatekeeper signing#117

Merged
iamvirul merged 6 commits into
mainfrom
fix/nsis-mui2-readme-macro
May 3, 2026
Merged

fix(ci): installer fixes — NSIS MUI2, YAML heredoc, macOS dark mode & Gatekeeper signing#117
iamvirul merged 6 commits into
mainfrom
fix/nsis-mui2-readme-macro

Conversation

@iamvirul

@iamvirul iamvirul commented May 3, 2026

Copy link
Copy Markdown
Owner

Changes in this PR

Fix 1 — YAML syntax error on release.yml L184

Inline heredoc (<< 'EOF') inside a run: | block caused a YAML parse error. Moved the content to .github/windows-installer/readme.txt (static tracked file) and replaced the heredoc with a cp call.

Fix 2 — Windows installer MUI_PAGE_README macro not found

MUI_PAGE_README does not exist in NSIS MUI2. makensis aborted with:

!insertmacro: macro named "MUI_PAGE_README" not found!

Removed the non-existent page. Wizard flow: Welcome → Directory → Installing → Finish.

Fix 3 — macOS installer HTML broken in dark mode

<code> and <pre> elements used a hardcoded background: #f2f2f7 (light gray) that rendered as a visual highlight artifact in macOS dark mode. Replaced with an adaptive CSS custom property:

:root { color-scheme: light dark; --code-bg: rgba(0,0,0,0.07); }
@media (prefers-color-scheme: dark) { :root { --code-bg: rgba(255,255,255,0.12); } }

Applied to welcome.html, readme.html, and conclusion.html.

Fix 4 — macOS Gatekeeper "unrecognized developer" warning

Unsigned .pkg files are blocked by Gatekeeper on first open. The release workflow now has dedicated Sign and Notarize steps:

Step Tool What it does
Sign .pkg productsign Signs with Developer ID Installer cert from keychain
Notarize .pkg notarytool --wait + stapler staple Submits to Apple; staples ticket for offline Gatekeeper

Both steps exit 0 gracefully when secrets are absent — builds still succeed without an Apple Developer account.

Required secrets (Settings → Secrets → Actions):

Secret Value
MACOS_CERTIFICATE base64 -i DevIDInstaller.p12
MACOS_CERTIFICATE_PWD Password for the .p12
MACOS_KEYCHAIN_PWD Any string (temp keychain password)
MACOS_IDENTITY Developer ID Installer: Name (TEAMID)
MACOS_NOTARIZATION_APPLE_ID Apple ID email
MACOS_NOTARIZATION_TEAM_ID 10-char team ID
MACOS_NOTARIZATION_PWD App-specific password

Release

These fixes ship as v1.4.3 (patch — CI/workflow only, no binary changes).

MUI2 has no MUI_PAGE_README macro — valid pages are WELCOME, LICENSE,
COMPONENTS, DIRECTORY, STARTMENU, INSTFILES, and FINISH. Using an
unknown macro name causes makensis to abort with 'macro not found'.

Remove the readme page entirely. The Welcome page already describes
what is being installed and the Finish page shows first-run
instructions with a link to the documentation. The unused readme.txt
resource file and its workflow copy step are also removed.

Wizard flow: Welcome → Directory → Installing → Finish
@coderabbitai

coderabbitai Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@iamvirul has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 53 minutes and 9 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ea47c1a3-4999-4e9d-9f4d-6b010be62b45

📥 Commits

Reviewing files that changed from the base of the PR and between 4b96226 and 350a3e0.

📒 Files selected for processing (2)
  • .github/workflows/release.yml
  • CHANGELOG.md
📝 Walkthrough

Walkthrough

Removed the Windows installer "Read Me" page and its quick-start README file; updated the release workflow to stop copying that README. Separately, macOS installer HTML pages were updated to use system color tokens and CSS variables, and the release workflow gained conditional macOS signing and notarization steps.

Changes

Windows installer README removal

Layer / File(s) Summary
Installer UI text
.github/windows-installer.nsi
Removed mention and insertion of the MUI_PAGE_README (wizard flow changed to Welcome → Directory → Installing → Finish).
Content removal
.github/windows-installer/readme.txt
Deleted the entire quick-start README (commands, supported DB list, links).
Build wiring
.github/workflows/release.yml
Removed step that copied .github/windows-installer/readme.txt into the build directory before generating installer.nsi; sed generation of installer.nsi remains.

macOS installer theming and packaging workflow

Layer / File(s) Summary
UI CSS variables
.github/macos-installer/welcome.html, .github/macos-installer/readme.html, .github/macos-installer/conclusion.html
Replaced hardcoded colors with :root CSS variables (e.g., --code-bg) and prefers-color-scheme: dark overrides; switched body/link colors to system semantic tokens (e.g., -apple-system-label, -apple-system-blue).
Release workflow variables & export
.github/workflows/release.yml
Adjusted macOS packaging variable assignments (kept VER_CLEAN, PKG_NAME), exports PKG_NAME and VERSION to GITHUB_ENV.
macOS signing
.github/workflows/release.yml
Added conditional "Sign .pkg with Developer ID" step that runs only if MACOS_CERTIFICATE is set; imports base64 cert into ephemeral keychain, runs productsign, and cleans up.
macOS notarization
.github/workflows/release.yml
Added conditional "Notarize and staple .pkg" step that runs only if MACOS_NOTARIZATION_APPLE_ID is set; calls xcrun notarytool submit --wait and xcrun stapler staple.

Sequence Diagram(s)

sequenceDiagram
  participant Actions as GitHub Actions
  participant FS as Filesystem
  participant Keychain as Temporary Keychain
  participant Apple as Apple Notary
  participant User as Maintainer

  User->>Actions: Push release (with env vars set)
  Actions->>FS: Build .pkg (VER_CLEAN, PKG_NAME)
  alt MACOS_CERTIFICATE set
    Actions->>FS: write base64 certificate
    Actions->>Keychain: import certificate into temp keychain
    Actions->>FS: productsign unsigned.pkg -> signed.pkg
    Keychain->>Actions: remove temp keychain
    FS->>FS: cleanup certificate file
  else not set
    Actions-->>Actions: skip signing
  end
  alt MACOS_NOTARIZATION_APPLE_ID set
    Actions->>Apple: xcrun notarytool submit --wait signed.pkg
    Apple-->>Actions: notarization result
    Actions->>FS: xcrun stapler staple signed.pkg
  else not set
    Actions-->>Actions: skip notarization
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

documentation

Poem

🐰 I nibbled a readme, light as a leaf,

Welcome now hops straight to the brief,
Mac pages wear night and day with delight,
Signatures tuck packages safe for the flight,
A tiny rabbit applauds—clean and bright.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title is overly broad and only partially related to the main change. The PR primarily fixes a NSIS MUI2 macro error by removing the non-existent MUI_PAGE_README reference, but the title lists four unrelated topics (NSIS MUI2, YAML heredoc, macOS dark mode, Gatekeeper signing), most of which are addressed in secondary files outside the core fix. Refocus the title on the primary fix: 'fix(ci): remove non-existent MUI_PAGE_README macro from NSIS script'. Alternatively, if other changes are equally important, restructure the PR into separate, focused pull requests.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/nsis-mui2-readme-macro

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 53 minutes and 9 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@iamvirul iamvirul changed the base branch from fix/release-yaml-heredoc to main May 3, 2026 14:51
@iamvirul iamvirul self-assigned this May 3, 2026
@codecov

codecov Bot commented May 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

iamvirul and others added 2 commits May 3, 2026 22:23
HTML pages:
- Replace hardcoded light-gray code backgrounds (#f2f2f7) with CSS
  custom property var(--code-bg) that adapts via prefers-color-scheme.
  Light mode: rgba(0,0,0,0.07), dark mode: rgba(255,255,255,0.12).
- Use color-scheme: light dark and -apple-system-label for body text
  so colours track the system appearance automatically.
- Applied to welcome.html, readme.html, and conclusion.html.

Gatekeeper / code signing:
- Split the monolithic 'Build .pkg installer' step into four steps:
    1. Build .pkg installer  (pkgbuild + productbuild)
    2. Sign .pkg with Developer ID  (productsign — optional)
    3. Notarize and staple .pkg  (notarytool + stapler — optional)
    4. Wrap .pkg in DMG  (hdiutil)
- Signing step imports the Developer ID Installer certificate from
  MACOS_CERTIFICATE (base64 .p12) into a temporary keychain, runs
  productsign, then deletes the keychain and the decoded .p12.
- Notarization step submits to Apple with notarytool --wait, then
  staples the ticket so Gatekeeper works offline too.
- Both steps exit 0 with a warning when their secrets are absent,
  so builds succeed even without an Apple Developer account.

Required GitHub secrets (set in repo Settings → Secrets):
  MACOS_CERTIFICATE          base64-encoded Developer ID Installer .p12
  MACOS_CERTIFICATE_PWD      password for the .p12
  MACOS_KEYCHAIN_PWD         temporary keychain password (any string)
  MACOS_IDENTITY             'Developer ID Installer: Name (TEAMID)'
  MACOS_NOTARIZATION_APPLE_ID  Apple ID email
  MACOS_NOTARIZATION_TEAM_ID   10-char team ID
  MACOS_NOTARIZATION_PWD       app-specific password
fix(macos-installer): dark mode code styling and Gatekeeper signing

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/release.yml:
- Around line 128-142: The "Sign .pkg with Developer ID" step only checks
MACOS_CERTIFICATE and may attempt signing even if MACOS_CERTIFICATE_PWD,
MACOS_KEYCHAIN_PWD, or MACOS_IDENTITY are missing; update the shell conditional
that currently tests MACOS_CERTIFICATE to instead verify all required secrets
(MACOS_CERTIFICATE, MACOS_CERTIFICATE_PWD, MACOS_KEYCHAIN_PWD, MACOS_IDENTITY)
and exit 0 with the existing warning message when any are unset so the step
truly skips gracefully.
- Around line 168-186: The "Notarize and staple .pkg" step only checks
MACOS_NOTARIZATION_APPLE_ID before running xcrun notarytool submit, so missing
MACOS_NOTARIZATION_TEAM_ID or MACOS_NOTARIZATION_PWD will cause a failure;
update the guard to validate all three environment variables
(MACOS_NOTARIZATION_APPLE_ID, MACOS_NOTARIZATION_TEAM_ID,
MACOS_NOTARIZATION_PWD) and skip notarization (exit 0) if any are unset, and
include an informative echo listing which variables are missing before exiting
to avoid running xcrun notarytool submit with incomplete credentials.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2b97c28f-818f-419b-8943-8bebac6dd53d

📥 Commits

Reviewing files that changed from the base of the PR and between f773421 and 4b96226.

📒 Files selected for processing (4)
  • .github/macos-installer/conclusion.html
  • .github/macos-installer/readme.html
  • .github/macos-installer/welcome.html
  • .github/workflows/release.yml
✅ Files skipped from review due to trivial changes (1)
  • .github/macos-installer/conclusion.html

Comment thread .github/workflows/release.yml
Comment thread .github/workflows/release.yml
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 3, 2026
@iamvirul iamvirul changed the title fix(ci): remove non-existent MUI_PAGE_README macro from NSIS script fix(ci): installer fixes — NSIS MUI2, YAML heredoc, macOS dark mode & Gatekeeper signing May 3, 2026
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Virul Nirmala Wickramasinghe <89099391+iamvirul@users.noreply.github.com>
@iamvirul iamvirul merged commit 9f6c739 into main May 3, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation github-actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant