Update GitHub Actions workflow for IPA build #607
This file contains hidden or 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 Unsigned Debug IPA | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build Debug IPA | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: '26.1' | |
| - name: Diagnostics (helpful in logs) | |
| run: | | |
| set -euxo pipefail | |
| xcodebuild -version | |
| xcode-select -p | |
| xcodebuild -showsdks | |
| - name: Resolve Swift Packages (device-only) | |
| run: | | |
| set -euxo pipefail | |
| xcodebuild -resolvePackageDependencies \ | |
| -project StikDebug.xcodeproj \ | |
| -scheme "StikDebug" \ | |
| -destination 'generic/platform=iOS' \ | |
| -skipPackagePluginValidation | |
| - name: Archive Build (Debug, Unsigned, Device-only) | |
| run: | | |
| set -euxo pipefail | |
| xcodebuild clean archive \ | |
| -project StikDebug.xcodeproj \ | |
| -scheme "StikDebug" \ | |
| -configuration Debug \ | |
| -archivePath "$PWD/build/StikDebug.xcarchive" \ | |
| -destination 'generic/platform=iOS' \ | |
| -derivedDataPath "$PWD/build/DerivedData" \ | |
| CODE_SIGNING_ALLOWED=NO \ | |
| CODE_SIGNING_REQUIRED=NO \ | |
| CODE_SIGN_IDENTITY="" \ | |
| SKIP_INSTALL=NO \ | |
| BUILD_LIBRARY_FOR_DISTRIBUTION=NO \ | |
| TEST_AFTER_BUILD=NO \ | |
| ENABLE_TESTABILITY=NO \ | |
| COMPILER_INDEX_STORE_ENABLE=NO \ | |
| SWIFT_OPTIMIZATION_LEVEL="-Onone" \ | |
| IPHONEOS_DEPLOYMENT_TARGET=17.4 | |
| - name: Create IPA from Archive | |
| run: | | |
| set -euxo pipefail | |
| APP_PATH="$PWD/build/StikDebug.xcarchive/Products/Applications/StikDebug.app" | |
| test -d "$APP_PATH" # fail early if archive didn't produce the .app | |
| mkdir -p Payload | |
| cp -R "$APP_PATH" Payload/ | |
| (cd Payload && zip -r ../StikDebug.ipa .) | |
| rm -rf Payload | |
| - name: Upload Debug IPA (artifact) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: StikDebug-Debug.ipa | |
| path: StikDebug.ipa | |
| retention-days: 90 | |
| - name: Create or Update GitHub Release (GitHub-Alpha) | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: GitHub-Alpha | |
| name: GitHub-Alpha | |
| prerelease: true | |
| generate_release_notes: false | |
| target_commitish: ${{ github.sha }} | |
| files: StikDebug.ipa | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |