diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5877aa..2d382ed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 \ No newline at end of file + name: DropMeJPEG.dmg + path: build/DropMeJPEG.dmg