img resized #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-dmg: | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Select Xcode | |
| run: xcodebuild -version | |
| - name: Build (Release) | |
| run: | | |
| set -euo pipefail | |
| xcodebuild -list | |
| SCHEME="CopyShot" | |
| xcodebuild \ | |
| -scheme "$SCHEME" \ | |
| -configuration Release \ | |
| -destination "generic/platform=macOS" \ | |
| -derivedDataPath build \ | |
| clean build | |
| - name: Locate .app | |
| id: locate_app | |
| run: | | |
| set -euo pipefail | |
| APP_PATH="$(find build/Build/Products/Release -maxdepth 1 -name "*.app" -print -quit)" | |
| if [ -z "${APP_PATH}" ]; then | |
| echo "Could not find .app in build/Build/Products/Release" | |
| ls -la build/Build/Products/Release || true | |
| exit 1 | |
| fi | |
| echo "APP_PATH=${APP_PATH}" >> $GITHUB_ENV | |
| echo "app_path=${APP_PATH}" >> "$GITHUB_OUTPUT" | |
| - name: Ad-hoc codesign (.app) | |
| run: | | |
| set -euo pipefail | |
| codesign --force --deep --sign - "${{ steps.locate_app.outputs.app_path }}" | |
| codesign --verify --deep --strict "${{ steps.locate_app.outputs.app_path }}" | |
| - name: Create DMG | |
| uses: ./.github/actions/create-dmg | |
| with: | |
| app_path: ${{ steps.locate_app.outputs.app_path }} | |
| dmg_output_path: dist/CopyShot-latest-main.dmg | |
| - name: Upload artifact (DMG) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: CopyShot-latest-main-dmg | |
| path: dist/CopyShot-latest-main.dmg | |
| if-no-files-found: error |