Skip to content

Add experimental MacOS Arm Builds. #7

Add experimental MacOS Arm Builds.

Add experimental MacOS Arm Builds. #7

Workflow file for this run

name: Build and Release iOS App
on:
push:
branches: [ main ]
jobs:
build-ios:
runs-on: macos-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.2'
- name: Install XcodeGen
run: brew install xcodegen
- name: Generate Fresh Xcode Project
run: |
# Remove the corrupted project file
rm -rf BetterClasscharts.xcodeproj
# Create project.yml
cat > project.yml << EOL
name: BetterClasscharts
options:
bundleIdPrefix: com.betterclasscharts
targets:
BetterClasscharts:
type: application
platform: iOS
sources: [BetterClasscharts]
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.betterclasscharts.app
SUPPORTED_PLATFORMS: "iphoneos iphonesimulator macosx"
SUPPORTS_MACCATALYST: YES
info:
path: BetterClasscharts/Info.plist
properties:
UILaunchStoryboardName: LaunchScreen
UISupportedInterfaceOrientations: [UIInterfaceOrientationPortrait]
UIApplicationSceneManifest:
UIApplicationSupportsMultipleScenes: false
EOL
# Generate new project
xcodegen generate
- name: Build iOS Archive
run: |
xcodebuild archive \
-project BetterClasscharts.xcodeproj \
-scheme BetterClasscharts \
-archivePath $RUNNER_TEMP/BetterClasscharts.xcarchive \
-sdk iphoneos \
-configuration Release \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO
- name: Create IPA
run: |
cd $RUNNER_TEMP/BetterClasscharts.xcarchive/Products/Applications
mkdir Payload
cp -r BetterClasscharts.app Payload
zip -r BetterClasscharts.ipa Payload
- name: Build Mac Archive
run: |
xcodebuild archive \
-project BetterClasscharts.xcodeproj \
-scheme BetterClasscharts \
-archivePath $RUNNER_TEMP/BetterClasscharts-Mac.xcarchive \
-destination 'platform=macOS,arch=arm64' \
-configuration Release \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO
- name: Create Mac App Bundle
run: |
cd $RUNNER_TEMP/BetterClasscharts-Mac.xcarchive/Products/Applications
zip -r BetterClasscharts-Mac.zip BetterClasscharts.app
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: alpha-${{ github.run_number }}
name: Alpha Build ${{ github.run_number }}
body: |
Alpha build generated from commit ${{ github.sha }}
**iOS Build**: Unsigned IPA. You'll need to use AltStore or similar to install it.
**Mac Build**: Experimental Apple Silicon build. Unsigned app bundle.
files: |
${{ runner.temp }}/BetterClasscharts.xcarchive/Products/Applications/BetterClasscharts.ipa
${{ runner.temp }}/BetterClasscharts-Mac.xcarchive/Products/Applications/BetterClasscharts-Mac.zip
prerelease: true