From ca40775678f358b1012a1dbd082a8d024486046f Mon Sep 17 00:00:00 2001 From: WerWolv Date: Fri, 22 Mar 2024 21:57:33 +0100 Subject: [PATCH] git: Make sure CI bundles correct macOS bundle into dmg --- .github/workflows/build.yml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9693c9de7..3aa6cd6b3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -213,14 +213,37 @@ jobs: -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \ -DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \ + -DCMAKE_INSTALL_PREFIX="./install" \ -DIMHEX_PATTERNS_PULL_MASTER=ON \ -DIMHEX_COMMIT_HASH_LONG="${GITHUB_SHA}" \ -DIMHEX_COMMIT_BRANCH="${GITHUB_REF##*/}" \ - -DCPACK_PACKAGE_FILE_NAME="imhex-${{env.IMHEX_VERSION}}-macOS${{matrix.suffix}}-x86_64" \ .. - name: 🛠️ Build - run: cd build && ninja package + run: cd build && ninja install + + - name: ✒️ Fix Signature + run: | + set -x + cd out + codesign --remove-signature ImHex.app + codesign --force --deep --sign - ImHex.app + + - name: 📁 Fix permissions + run: | + set -x + cd build/install + chmod -R 755 ImHex.app/ + + - name: 📦 Create DMG + run: | + set -x + mkdir bundle + mv build/install/ImHex.app bundle + cd bundle + ln -s /Applications Applications + cd .. + hdiutil create -volname "ImHex" -srcfolder bundle -ov -format UDZO imhex-${{env.IMHEX_VERSION}}-macOS${{matrix.suffix}}-x86_64.dmg - name: ⬆️ Upload DMG uses: actions/upload-artifact@v4