git: Produce nicer looking DMG file for macOS
This commit is contained in:
parent
058a8cdc15
commit
3f38f42259
44
.github/workflows/build.yml
vendored
44
.github/workflows/build.yml
vendored
@ -237,7 +237,7 @@ jobs:
|
|||||||
ninja
|
ninja
|
||||||
|
|
||||||
# MacOS build
|
# MacOS build
|
||||||
macos:
|
macos-x86:
|
||||||
runs-on: macos-13
|
runs-on: macos-13
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@ -370,19 +370,12 @@ jobs:
|
|||||||
|
|
||||||
- name: 📦 Create DMG
|
- name: 📦 Create DMG
|
||||||
run: |
|
run: |
|
||||||
set -x
|
git clone https://github.com/sindresorhus/create-dmg
|
||||||
mkdir bundle
|
cd create-dmg
|
||||||
mv build/install/ImHex.app bundle
|
npm i
|
||||||
cd bundle
|
cd ../build/install
|
||||||
ln -s /Applications Applications
|
create-dmg ImHex.app
|
||||||
cd ..
|
mv *.dmg ../../imhex-${{ env.IMHEX_VERSION }}-macOS${{ matrix.suffix }}-x86_64.dmg
|
||||||
for i in $(seq 1 10); do
|
|
||||||
if hdiutil create -volname "ImHex" -srcfolder bundle -ov -format UDZO imhex-${{ env.IMHEX_VERSION }}-macOS${{ matrix.suffix }}-x86_64.dmg; then
|
|
||||||
echo "Created dmg after ${i} attempts"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
sleep 10
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: 🗝️ Generate build provenance attestations
|
- name: 🗝️ Generate build provenance attestations
|
||||||
uses: actions/attest-build-provenance@v2
|
uses: actions/attest-build-provenance@v2
|
||||||
@ -398,7 +391,7 @@ jobs:
|
|||||||
name: macOS DMG${{ matrix.suffix }} x86_64
|
name: macOS DMG${{ matrix.suffix }} x86_64
|
||||||
path: ./*.dmg
|
path: ./*.dmg
|
||||||
|
|
||||||
macos-arm64-build:
|
macos-arm64:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
name: 🍎 macOS 13 arm64
|
name: 🍎 macOS 13 arm64
|
||||||
|
|
||||||
@ -447,7 +440,7 @@ jobs:
|
|||||||
macos-arm64-package:
|
macos-arm64-package:
|
||||||
runs-on: macos-13
|
runs-on: macos-13
|
||||||
name: 🍎 macOS 13 arm64 Packaging
|
name: 🍎 macOS 13 arm64 Packaging
|
||||||
needs: macos-arm64-build
|
needs: macos-arm64
|
||||||
|
|
||||||
env:
|
env:
|
||||||
IMHEX_VERSION: ${{ needs.macos-arm64-build.outputs.IMHEX_VERSION }}
|
IMHEX_VERSION: ${{ needs.macos-arm64-build.outputs.IMHEX_VERSION }}
|
||||||
@ -490,19 +483,12 @@ jobs:
|
|||||||
|
|
||||||
- name: 📦 Create DMG
|
- name: 📦 Create DMG
|
||||||
run: |
|
run: |
|
||||||
set -x
|
git clone https://github.com/sindresorhus/create-dmg
|
||||||
mkdir bundle
|
cd create-dmg
|
||||||
mv out/ImHex.app bundle
|
npm i
|
||||||
cd bundle
|
cd ../build/install
|
||||||
ln -s /Applications Applications
|
create-dmg ImHex.app
|
||||||
cd ..
|
mv *.dmg ../../imhex-${{ env.IMHEX_VERSION }}-macOS${{ matrix.suffix }}-arm64.dmg
|
||||||
for i in $(seq 1 10); do
|
|
||||||
if hdiutil create -volname "ImHex" -srcfolder bundle -ov -format UDZO imhex-${{ env.IMHEX_VERSION }}-macOS-arm64.dmg; then
|
|
||||||
echo "Created dmg after ${i} attempts"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
sleep 10
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: 🗝️ Generate build provenance attestations
|
- name: 🗝️ Generate build provenance attestations
|
||||||
uses: actions/attest-build-provenance@v2
|
uses: actions/attest-build-provenance@v2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user