Skip to content

Fix build output path to include Release configuration #3

Fix build output path to include Release configuration

Fix build output path to include Release configuration #3

Workflow file for this run

name: Create Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build-and-release:
name: Build and Release macOS app
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Build macOS app
run: |
xcodebuild build \
-project McFind.xcodeproj \
-scheme McFind \
-configuration Release \
-destination "platform=macOS"
- name: Create DMG
run: |
# Find the actual build output directory
BUILD_DIR=$(xcodebuild -project McFind.xcodeproj -scheme McFind -configuration Release -showBuildSettings | grep -m 1 "BUILD_DIR" | cut -d'=' -f2 | xargs)
echo "Build directory: $BUILD_DIR"
# Create app bundle directory
mkdir -p McFind-Release
cp -R "$BUILD_DIR/Release/McFind.app" McFind-Release/
# Create DMG
hdiutil create -volname "McFind" -srcfolder McFind-Release -ov -format UDZO McFind.dmg
# Create installer package (optional)
pkgbuild --root McFind-Release --identifier com.mcfind.McFind --version 1.0 --install-location /Applications McFind.pkg
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
McFind.dmg
McFind.pkg
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}