From 5866a3b5afedd8ae4a5d877fc2e3615b1da37666 Mon Sep 17 00:00:00 2001 From: samzong Date: Wed, 23 Oct 2024 00:27:42 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20ci:=20Update=20build-and-release?= =?UTF-8?q?=20workflow=20for=20DMG=20creation=20process?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refactor the DMG creation steps in the GitHub Actions workflow. Move the app to a temporary directory for better organization and create a symbolic link to the Applications folder. This improves the clarity and structure of the build process. --- .github/workflows/build-and-release.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 030a257..3669951 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -40,14 +40,15 @@ jobs: - name: Prepare for DMG run: | - mkdir -p dist - mv build/export/MacMusicPlayer.app dist/ - ls -R dist + mkdir -p dist/dmg_temp + mv build/export/MacMusicPlayer.app dist/dmg_temp/ + ln -s /Applications dist/dmg_temp/Applications + ls -R dist/dmg_temp - name: Create DMG run: | hdiutil create -volname MacMusicPlayer \ - -srcfolder dist \ + -srcfolder dist/dmg_temp \ -ov -format UDZO dist/MacMusicPlayer.dmg - name: Create Release and Upload Asset