macOS build workflow too now

This commit is contained in:
Francesco 2025-05-12 19:05:07 +02:00
parent 1839f31f9a
commit 631b99ab01
2 changed files with 64 additions and 2 deletions

View file

@ -1,10 +1,10 @@
name: Build and Release IPA
name: Build and Release
on:
push:
branches:
- dev
jobs:
build:
build-ios:
name: Build IPA
runs-on: macOS-latest
steps:
@ -27,3 +27,31 @@ jobs:
name: Sulfur-IPA
path: build/Sulfur.ipa
compression-level: 0
build-mac:
name: Build Mac Catalyst
runs-on: macOS-latest
steps:
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Checkout code
uses: actions/checkout@v4
- name: Run macbuild.sh
run: |
chmod +x macbuild.sh
./macbuild.sh
- name: Create DMG
run: |
hdiutil create -volname "Sulfur" -srcfolder build/Sulfur.app -ov -format UDZO build/Sulfur.dmg
- name: Upload Mac artifact
uses: actions/upload-artifact@v4
with:
name: Sulfur-Mac
path: build/Sulfur.dmg
compression-level: 0

34
macbuild.sh Executable file
View file

@ -0,0 +1,34 @@
#!/bin/bash
set -e
cd "$(dirname "$0")"
WORKING_LOCATION="$(pwd)"
APPLICATION_NAME=Sulfur
if [ ! -d "build" ]; then
mkdir build
fi
cd build
xcodebuild -project "$WORKING_LOCATION/$APPLICATION_NAME.xcodeproj" \
-scheme "$APPLICATION_NAME" \
-configuration Release \
-derivedDataPath "$WORKING_LOCATION/build/DerivedDataApp" \
-destination 'platform=macOS,variant=Mac Catalyst' \
clean build \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO"
DD_APP_PATH="$WORKING_LOCATION/build/DerivedDataApp/Build/Products/Release-maccatalyst/$APPLICATION_NAME.app"
TARGET_APP="$WORKING_LOCATION/build/$APPLICATION_NAME.app"
cp -r "$DD_APP_PATH" "$TARGET_APP"
codesign --remove "$TARGET_APP"
if [ -e "$TARGET_APP/_CodeSignature" ]; then
rm -rf "$TARGET_APP/_CodeSignature"
fi
echo "Mac Catalyst build completed: $TARGET_APP"