Add macOS distributable support with .icns icon generation#21
Open
rogerb831 wants to merge 13 commits intolukasbach:mainfrom
Open
Add macOS distributable support with .icns icon generation#21rogerb831 wants to merge 13 commits intolukasbach:mainfrom
rogerb831 wants to merge 13 commits intolukasbach:mainfrom
Conversation
- Add macOS to verify.yml workflow matrix to test builds on both Windows and macOS - Enable macOS in publish.yml workflow matrix to publish macOS distributables - Both workflows now run on windows-latest and macos-latest This enables building and testing macOS DMG and ZIP distributables in CI.
- Add packageAfterPrune hook to remove problematic .bin symlinks that break ASAR packaging - Recursively remove all .bin directories and symlinks from node_modules - Add architecture matrix to workflows for building both arm64 and x64 macOS distributables - Windows builds unchanged (no architecture specified) - macOS builds now test both arm64 and x64 architectures The symlink removal is safe as .bin directories are only needed for development (npm/yarn scripts), not at runtime.
- Change x64 macOS builds to use macos-15-intel runner (Intel hardware) - macos-latest runners are ARM64 and cannot natively build x64
- Update forge.config.ts to read repository owner and name from environment variables - Owner: Uses GITHUB_REPOSITORY_OWNER or parses GITHUB_REPOSITORY - Name: Parses GITHUB_REPOSITORY to extract repo name - Falls back to hardcoded 'lukasbach/pensieve' if env vars not set - Update publish.yml workflow to pass repository info as environment variables - Sets GITHUB_REPOSITORY_OWNER from github.repository_owner - Sets GITHUB_REPOSITORY from github.repository - Allows publishing releases to any fork that runs the workflow
- Move version bump to dedicated 'bump-version' job that runs first - Add 'needs: bump-version' to publish job so it waits for version bump - Prevents conflicts when multiple matrix jobs try to bump version simultaneously - Each publish job will checkout the code with the updated version already committed
- Split workflow into three jobs: build, bump-version, publish - Build job runs all platforms in parallel, uploads distributables as artifacts - Bump-version job only runs if all builds succeed (needs: build) - Publish job downloads pre-built distributables and publishes them - Version is only incremented if builds succeed, preventing version bumps on failures - Uses artifact_suffix in matrix for consistent artifact naming
- Add condition to bump-version job: only runs if github.repository == 'lukasbach/pensieve' - Update publish job to depend on both build and bump-version - Publish job runs if bump-version succeeded or was skipped (for forks) - Allows forks to publish releases without version bumps - Version bumps should only happen in upstream CI
- Remove build-first approach that separated build and publish jobs - Keep fork-friendly logic from bca725a (skip version bump for non-upstream) - Restore simpler workflow: bump-version -> publish (builds and publishes) - Version bump happens before builds, ensuring correct version in distributables
- Generate .icns file for macOS using iconutil - Create all required macOS icon sizes (16x16 through 1024x1024 with @2x variants) - Update packagerConfig to use base icon path for automatic platform detection - Update MakerDMG to use .icns format - Rename Windows ICO from [email protected] to icon.ico for standard naming - Generate both .ico and .icns formats for cross-platform compatibility
- Add postMake hook to automatically embed Pensieve Installer.app into DMG - Installer helper automatically copies app to Applications and removes quarantine - Fix icon configuration to use platform-appropriate format (.icns for macOS) - Update README with instructions for using the DMG installer helper
- Use array destructuring for regex match result - Convert lonely if in else block to else if - Fix Prettier formatting issues
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.
Summary
This PR adds support for building and publishing macOS distributables (both ARM64 and x64) in the CI/CD pipeline, along with proper macOS icon generation.
Changes
CI/CD Pipeline Updates
macos-15-intelrunner for Intel-based buildslukasbach/pensieve), allowing forks to publish without version conflictsmacOS Icon Generation
.icnsicon generation: Uses macOSiconutilto create proper macOS icon format.icnsfor macOS,.icofor Windows.icnsformat for macOS DMG filesBug Fixes
node_modules/.bindirectories that break ASAR packagingconsole.log/console.errorwith proper loggingTesting
.icnsand.icofiles generated correctlyRelated Issues
Addresses macOS build support for the project.