diff --git a/.github/workflows/build-app.yaml b/.github/workflows/build-app.yaml index 507516a..5b5ba28 100644 --- a/.github/workflows/build-app.yaml +++ b/.github/workflows/build-app.yaml @@ -8,13 +8,11 @@ jobs: - name: Select Xcode 15 run: sudo xcode-select -s '/Applications/Xcode_15.0.1.app/Contents/Developer' - uses: actions/checkout@v2 - - run: brew install coreutils gnu-sed nasm ninja meson patchutils + - run: brew install coreutils gnu-sed nasm ninja meson patchutils create-dmg - name: Build run: ./build.sh - - name: Compress app bundle - run: XZ_OPT=-9 tar cJf testbox/TES3MP.app.tar.xz testbox/TES3MP.app - - name: Save compressed app bundle as an artifact + - name: Save .dmg as an artifact uses: actions/upload-artifact@v2 with: - name: TES3MP.app.tar.xz - path: testbox/TES3MP.app.tar.xz + name: release + path: "*.dmg" diff --git a/.gitignore b/.gitignore index f9f7893..6095400 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ out -testbox \ No newline at end of file +testbox +*.dmg \ No newline at end of file diff --git a/40-test-fixup-deps.sh b/40-test-fixup-deps.sh index f1af822..9b73ef7 100755 --- a/40-test-fixup-deps.sh +++ b/40-test-fixup-deps.sh @@ -61,4 +61,12 @@ cp out/src/TES3MP/AUTHORS.md testbox/OpenMW.app/Contents/Resources/ cp out/src/TES3MP/tes3mp-credits.md testbox/OpenMW.app/Contents/Resources/ # Rename OpenMW.app to TES3MP.app. -mv testbox/OpenMW.app testbox/TES3MP.app \ No newline at end of file +mv testbox/OpenMW.app testbox/TES3MP.app + +# Create a .dmg. +create-dmg --volname "TES3MP-$TES3MP_VERSION" \ + --volicon testbox/TES3MP.app/Contents/Resources/TES3MP.icns \ + --window-size 800 400 \ + --icon "TES3MP.app" 200 190 \ + --app-drop-link 600 185 \ + TES3MP-$TES3MP_VERSION.dmg ./testbox \ No newline at end of file