1- name : Build Unsigned Debug IPA
1+ name : Build Debug IPA
22
33on :
44 push :
@@ -11,22 +11,22 @@ permissions:
1111 contents : write
1212
1313jobs :
14- build :
15- name : Build Debug IPA
14+ build_and_release :
15+ name : Build & Release IPA
1616 runs-on : macos-latest
1717 env :
1818 UPLOAD_IPA : ${{ vars.UPLOAD_IPA || 'true' }}
1919
2020 steps :
21- - name : Checkout
21+ - name : 1. Fetch Source Code
2222 uses : actions/checkout@v4
2323
24- - name : Setup Xcode (latest stable)
24+ - name : 2. Configure Xcode Environment
2525 uses : maxim-lobanov/setup-xcode@v1
2626 with :
2727 xcode-version : ' 26.0.1'
2828
29- - name : Archive Build (Debug, Unsigned)
29+ - name : 3. Compile Project Archive
3030 run : |
3131 xcodebuild clean archive \
3232 -project StikDebug.xcodeproj \
@@ -42,28 +42,34 @@ jobs:
4242 SWIFT_OPTIMIZATION_LEVEL="-Onone" \
4343 IPHONEOS_DEPLOYMENT_TARGET=17.4
4444
45- - name : Create IPA from Archive
45+ - name : 4. Package .app into .ipa
4646 run : |
4747 cp -R build/StikDebug.xcarchive/Products/Applications/StikDebug.app .
4848 mkdir -p Payload
4949 cp -R StikDebug.app Payload/
5050 zip -r StikDebug.ipa Payload
5151 rm -rf Payload StikDebug.app
5252
53- - name : Upload Debug IPA (artifact)
53+ - name : 5. Store IPA as Workflow Artifact
5454 if : env.UPLOAD_IPA == 'true'
5555 uses : actions/upload-artifact@v4
5656 with :
5757 name : StikDebug-Debug.ipa
5858 path : StikDebug.ipa
5959 retention-days : 90
6060
61- - name : Create or Update GitHub Release (GitHub-Alpha)
62- if : env.UPLOAD_IPA == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'
61+ - name : 6. Extract Version Information
62+ id : version
63+ run : |
64+ VERSION=$(sed -n 's/.*MARKETING_VERSION = \(.*\);/\1/p' StikDebug.xcodeproj/project.pbxproj | head -1 | xargs)
65+ echo "app_version=$VERSION" >> "$GITHUB_OUTPUT"
66+
67+ - name : 7. Deploy to Nightly Release
68+ if : env.UPLOAD_IPA == 'true' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main'
6369 uses : softprops/action-gh-release@v2
6470 with :
65- tag_name : GitHub-Alpha
66- name : GitHub-Alpha
71+ tag_name : Nightly
72+ name : " Nightly Build - v${{ steps.version.outputs.app_version }} "
6773 prerelease : true
6874 generate_release_notes : false
6975 target_commitish : ${{ github.sha }}
0 commit comments