mirror of
https://github.com/cranci1/Sora.git
synced 2026-05-08 03:00:21 +00:00
macOS build workflow too now
This commit is contained in:
parent
1839f31f9a
commit
631b99ab01
2 changed files with 64 additions and 2 deletions
32
.github/workflows/build.yml
vendored
32
.github/workflows/build.yml
vendored
|
|
@ -1,10 +1,10 @@
|
||||||
name: Build and Release IPA
|
name: Build and Release
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-ios:
|
||||||
name: Build IPA
|
name: Build IPA
|
||||||
runs-on: macOS-latest
|
runs-on: macOS-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -27,3 +27,31 @@ jobs:
|
||||||
name: Sulfur-IPA
|
name: Sulfur-IPA
|
||||||
path: build/Sulfur.ipa
|
path: build/Sulfur.ipa
|
||||||
compression-level: 0
|
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
34
macbuild.sh
Executable 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"
|
||||||
Loading…
Reference in a new issue