Skip to content

img resized

img resized #8

Workflow file for this run

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