Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the CI workflow with improved build consistency, automated validation, and professional DMG creation for both Windows and macOS releases. The changes focus on making the release process more reliable and generating cleaner artifacts.
- Always regenerate macOS icon files in CI for consistency and update image resizing API for newer Pillow versions
- Add automated validation steps for Windows executables (PE header check) and macOS app bundles (structure and permissions)
- Replace basic hdiutil with create-dmg for professional macOS DMG packaging and flatten artifact directory structure for cleaner releases
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| fi | ||
| iconutil -c icns build/icons/PhotoSort.iconset -o assets/photosort.icns | ||
| fi | ||
|
|
There was a problem hiding this comment.
Extra 'fi' statement on line 127 will cause a syntax error since there's no corresponding 'if' statement. This line should be removed.
| "$STAGING_DIR" \ | ||
| || true # create-dmg exits with 2 on success sometimes |
There was a problem hiding this comment.
Using || true to ignore all exit codes masks potential real failures. Consider checking for specific expected exit codes (like 2) instead of ignoring all failures.
| "$STAGING_DIR" \ | |
| || true # create-dmg exits with 2 on success sometimes | |
| "$STAGING_DIR" | |
| # create-dmg exits with 2 on success sometimes; fail for other codes | |
| status=$? | |
| if [ "$status" -ne 0 ] && [ "$status" -ne 2 ]; then | |
| echo "create-dmg failed with exit code $status" >&2 | |
| exit $status | |
| fi |
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| iconutil -c icns build/icons/PhotoSort.iconset -o assets/photosort.icns | ||
| fi | ||
| iconutil -c icns build/icons/PhotoSort.iconset -o assets/photosort.icns | ||
| fi |
There was a problem hiding this comment.
The 'fi' statement is orphaned after removing the conditional check. This will cause a shell syntax error.
| "$STAGING_DIR" \ | ||
| || true # create-dmg exits with 2 on success sometimes |
There was a problem hiding this comment.
Using || true to suppress exit codes can mask real failures. Consider checking the specific exit code (2) that indicates success instead of ignoring all errors.
| "$STAGING_DIR" \ | |
| || true # create-dmg exits with 2 on success sometimes | |
| "$STAGING_DIR" | |
| status=$? | |
| if [ "$status" -ne 0 ] && [ "$status" -ne 2 ]; then | |
| echo "create-dmg failed with exit code $status" >&2 | |
| exit $status | |
| fi |
This pull request improves the consistency, reliability, and professionalism of the release build process for both Windows and macOS in the
.github/workflows/release-build.ymlworkflow. The main changes include always regenerating the macOS icon file, updating image resizing for compatibility, adding automated validation steps for build artifacts, enhancing DMG packaging for macOS, and flattening the artifact directory for cleaner releases.Build consistency and compatibility:
.icnsicon file in CI for macOS builds to avoid inconsistencies caused by stale assets.Image.Resampling.LANCZOSfor compatibility with newer versions.Automated artifact validation:
Release packaging improvements:
create-dmgfor macOS DMG creation, ensuring a professional appearance and reliable artifact naming, with additional checks for DMG existence and cleanup of staging files..exe,.dmg,.sha256) are attached to the GitHub release, simplifying the release structure.