From 7b103175b2c8e48199c42d1f0209bc76897a2081 Mon Sep 17 00:00:00 2001 From: Stephen <158498287+StephenDev0@users.noreply.github.com> Date: Wed, 25 Feb 2026 10:28:49 -0500 Subject: [PATCH] Refactor GitHub Actions workflow for IPA build and release --- .github/workflows/build_ipa.yml | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build_ipa.yml b/.github/workflows/build_ipa.yml index b3c37ad..b595e63 100644 --- a/.github/workflows/build_ipa.yml +++ b/.github/workflows/build_ipa.yml @@ -1,4 +1,4 @@ -name: Build Unsigned Debug IPA +name: Build Debug IPA on: push: @@ -11,22 +11,22 @@ permissions: contents: write jobs: - build: - name: Build Debug IPA + build_and_release: + name: Build & Release IPA runs-on: macos-latest env: UPLOAD_IPA: ${{ vars.UPLOAD_IPA || 'true' }} steps: - - name: Checkout + - name: 1. Fetch Source Code uses: actions/checkout@v4 - - name: Setup Xcode (latest stable) + - name: 2. Configure Xcode Environment uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: '26.0.1' - - name: Archive Build (Debug, Unsigned) + - name: 3. Compile Project Archive run: | xcodebuild clean archive \ -project StikDebug.xcodeproj \ @@ -42,7 +42,7 @@ jobs: SWIFT_OPTIMIZATION_LEVEL="-Onone" \ IPHONEOS_DEPLOYMENT_TARGET=17.4 - - name: Create IPA from Archive + - name: 4. Package .app into .ipa run: | cp -R build/StikDebug.xcarchive/Products/Applications/StikDebug.app . mkdir -p Payload @@ -50,7 +50,7 @@ jobs: zip -r StikDebug.ipa Payload rm -rf Payload StikDebug.app - - name: Upload Debug IPA (artifact) + - name: 5. Store IPA as Workflow Artifact if: env.UPLOAD_IPA == 'true' uses: actions/upload-artifact@v4 with: @@ -58,12 +58,18 @@ jobs: path: StikDebug.ipa retention-days: 90 - - name: Create or Update GitHub Release (GitHub-Alpha) - if: env.UPLOAD_IPA == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main' + - name: 6. Extract Version Information + id: version + run: | + VERSION=$(sed -n 's/.*MARKETING_VERSION = \(.*\);/\1/p' StikDebug.xcodeproj/project.pbxproj | head -1 | xargs) + echo "app_version=$VERSION" >> "$GITHUB_OUTPUT" + + - name: 7. Deploy to Nightly Release + if: env.UPLOAD_IPA == 'true' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' uses: softprops/action-gh-release@v2 with: - tag_name: GitHub-Alpha - name: GitHub-Alpha + tag_name: Nightly + name: "Nightly Build - v${{ steps.version.outputs.app_version }}" prerelease: true generate_release_notes: false target_commitish: ${{ github.sha }}