Better network error handling & more session refreshes #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
SUPPORTS_MACCATALYST: YES | |
DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER: YES | |
SUPPORTS_MAC_DESIGNED_FOR_IPAD: 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,variant=Mac Catalyst,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 |