Refactor GitHub Actions workflow for IPA build and release

This commit is contained in:
Stephen 2026-02-25 10:28:49 -05:00 • committed by GitHub
parent 880f610c64
commit 7b103175b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 }}