Skip to content

v1.0.2

v1.0.2 #31

Workflow file for this run

name: Build and Release macOS App
on:
release:
types: [published]
workflow_dispatch:
inputs:
uploadUrl:
description: "Upload URL for the build output. If not provided, the action will fail."
required: false
type: string
jobs:
build:
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: "16.1"
- name: Build the app
run: |
xcodebuild -project Taskito.xcodeproj \
-scheme Taskito \
-configuration Release \
-derivedDataPath build \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO
- name: Verify App Existence
run: ls -la build/Build/Products/Release/
- name: Verify App Bundle Contents
run: |
echo "📦 Checking app bundle structure..."
ls -la build/Build/Products/Release/Taskito.app/Contents/
echo ""
echo "🔍 Checking Resources folder..."
ls -la build/Build/Products/Release/Taskito.app/Contents/Resources/
echo ""
echo "🎨 Looking for icon files..."
find build/Build/Products/Release/Taskito.app/Contents/Resources -name "*.icns" || echo "⚠️ No .icns files found!"
- name: Install appdmg and fileicon
run: |
npm install -g appdmg
npm install -g fileicon
- name: Create Dist Directory
run: mkdir -p dist
- name: Create DMG with appdmg
run: |
appdmg appdmg.json dist/Taskito.dmg
- name: Set DMG Icon
run: |
ICON_PATH="build/Build/Products/Release/Taskito.app/Contents/Resources/AppIcon.icns"
if [ -f "$ICON_PATH" ]; then
echo "✅ Found icon at: $ICON_PATH"
fileicon set dist/Taskito.dmg "$ICON_PATH" && echo "✅ DMG icon set successfully" || {
echo "⚠️ fileicon command failed, but continuing..."
exit 0
}
else
echo "⚠️ Icon not found at: $ICON_PATH"
echo "🔍 Searching for any .icns file..."
FOUND_ICON=$(find build/Build/Products/Release/Taskito.app/Contents/Resources -name "*.icns" -type f 2>/dev/null | head -n 1)
if [ -n "$FOUND_ICON" ] && [ -f "$FOUND_ICON" ]; then
echo "📦 Using alternative icon: $FOUND_ICON"
fileicon set dist/Taskito.dmg "$FOUND_ICON" && echo "✅ DMG icon set successfully" || {
echo "⚠️ fileicon command failed, but continuing..."
exit 0
}
else
echo "⚠️ No .icns files found. Skipping DMG icon setup."
echo "ℹ️ DMG will be created without custom icon."
exit 0
fi
fi
- name: Validate DMG
run: hdiutil verify dist/Taskito.dmg
- name: Upload Release Asset
if: github.event_name == 'release'
uses: softprops/action-gh-release@v2
with:
files: dist/Taskito.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload DMG as Artifact
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: Taskito-DMG
path: dist/Taskito.dmg
retention-days: 30