Skip to content

Commit

Permalink
fix: simplify dmg creation
Browse files Browse the repository at this point in the history
  • Loading branch information
zpg6 committed Nov 29, 2024
1 parent 8d5bab3 commit 8d2a452
Showing 1 changed file with 9 additions and 24 deletions.
33 changes: 9 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,20 @@ jobs:
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]")
echo $default | cat >default
echo Using default scheme: $default
- name: Build
env:
scheme: ${{ 'default' }}
run: |
if [ $scheme = default ]; then scheme=$(cat default); fi
if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi
file_to_build=`echo $file_to_build | awk '{$1=$1;print}'`
xcodebuild clean build analyze -scheme "$scheme" -"$filetype_parameter" "$file_to_build" | xcpretty && exit ${PIPESTATUS[0]}
- name: Archive
env:
scheme: ${{ 'default' }}
- name: Build App
run: |
if [ $scheme = default ]; then scheme=$(cat default); fi
if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi
file_to_build=`echo $file_to_build | awk '{$1=$1;print}'`
xcodebuild clean archive -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -archivePath build/Release/DropMeJPEG.xcarchive | xcpretty && exit ${PIPESTATUS[0]}
xcodebuild clean build \
-sdk macosx \
-configuration Release \
-derivedDataPath build
- name: Create DMG
run: |
mkdir -p build/Release
cp -r DropMeJPEG.app build/Release
hdiutil create -volname "DropMeJPEG" -srcfolder build/Release -ov -format UDZO DropMeJPEG.dmg
mv DropMeJPEG.dmg build/Release
ls -la
ls -la build/Release
hdiutil create -volname DropMeJPEG -srcfolder build/Release/DropMeJPEG.app build/DropMeJPEG.dmg
- name: Upload DMG
uses: actions/upload-artifact@v4
with:
name: DropMeJPEG
path: build/Release/DropMeJPEG.dmg
name: DropMeJPEG.dmg
path: build/DropMeJPEG.dmg

0 comments on commit 8d2a452

Please sign in to comment.