File tree Expand file tree Collapse file tree 1 file changed +19
-6
lines changed
Expand file tree Collapse file tree 1 file changed +19
-6
lines changed Original file line number Diff line number Diff line change 66 workflow_dispatch :
77
88jobs :
9- build-web :
10- name : Build web bundle (www)
9+ build-and-deploy-app :
10+ name : Build and Deploy iOS App
1111 runs-on : macos-15
1212 # Ensure manual runs only proceed on the ci-cd branch
1313 if : github.ref == 'refs/heads/ci-cd'
@@ -202,9 +202,17 @@ jobs:
202202 API_KEY_B64 : ${{ secrets.APPSTORE_API_PRIVATE_KEY }}
203203 run : |
204204 set -euo pipefail
205+ key_id="${{ secrets.APPSTORE_API_KEY_ID }}"
206+ [ -z "$key_id" ] && {
207+ echo "APPSTORE_API_KEY_ID secret is missing" >&2
208+ exit 1
209+ }
205210 mkdir -p ~/private_keys
211+ mkdir -p ~/.appstoreconnect/private_keys
206212 echo -n "$API_KEY_B64" | base64 --decode \
207213 > ~/private_keys/AuthKey_${{ secrets.APPSTORE_API_KEY_ID }}.p8
214+ cp ~/private_keys/AuthKey_${{ secrets.APPSTORE_API_KEY_ID }}.p8 \
215+ ~/.appstoreconnect/private_keys/AuthKey_${{ secrets.APPSTORE_API_KEY_ID }}.p8
208216
209217 - name : Upload to TestFlight
210218 env :
@@ -213,7 +221,12 @@ jobs:
213221 run : |
214222 set -euo pipefail
215223 IPA=$(ls $RUNNER_TEMP/export/*.ipa | head -n 1)
216- xcrun iTMSTransporter -m upload \
217- -assetFile "$IPA" \
218- -apiKey "$API_KEY_ID" \
219- -apiIssuer "$API_ISSUER_ID"
224+ if [[ -z "$IPA" || ! -f "$IPA" ]]; then
225+ echo "No IPA found to upload" >&2
226+ exit 1
227+ fi
228+ xcrun altool --upload-app \
229+ --type ios \
230+ --file "$IPA" \
231+ --apiKey "$API_KEY_ID" \
232+ --apiIssuer "$API_ISSUER_ID"
You can’t perform that action at this time.
0 commit comments