From 2ee22bb6c00a28f32eb26672e98cb7b37cbc7f19 Mon Sep 17 00:00:00 2001 From: RAKKUNN Date: Sun, 12 Apr 2026 20:32:28 +0900 Subject: [PATCH] Fix: Place resource bundle at .app root (Bundle.main.bundleURL) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SPM's generated Bundle.module accessor checks: 1. Bundle.main.bundleURL/KeyboardShortcuts_*.bundle → .app/ 2. Hardcoded build path (CI-only, doesn't exist on user machine) Previous fix copied to .app/Contents/Resources/ and MacOS/, but neither matches Bundle.main.bundleURL which is .app/ itself. --- .github/workflows/release.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5138c7a..665268e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,16 +68,14 @@ jobs: cp .build/release/${{ env.APP_NAME }} "$APP_DIR/MacOS/" # Copy SPM resource bundles (e.g. KeyboardShortcuts) - find .build -name "*.bundle" -path "*/release/*" -exec cp -R {} "$APP_DIR/Resources/" \; - - # Also place bundles next to the executable (fallback search path) - find .build -name "*.bundle" -path "*/release/*" -exec cp -R {} "$APP_DIR/MacOS/" \; + # Bundle.module looks at Bundle.main.bundleURL (= .app/) first, + # so place bundles at the .app root — the path SPM actually checks. + APP_ROOT="${{ runner.temp }}/${{ env.APP_NAME }}.app" + find .build -name "*.bundle" -path "*/release/*" -exec cp -R {} "$APP_ROOT/" \; # Verify bundles were copied - echo "=== Resources ===" - ls -la "$APP_DIR/Resources/" || true - echo "=== MacOS ===" - ls -la "$APP_DIR/MacOS/" || true + echo "=== .app root ===" + ls -la "$APP_ROOT/" || true cp ${{ env.APP_NAME }}/Info.plist "$APP_DIR/" /usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${{ steps.version.outputs.VERSION }}" "$APP_DIR/Info.plist"