Skip to content

Commit

Permalink
ci: add build ios ipa without signing
Browse files Browse the repository at this point in the history
  • Loading branch information
Duell10111 committed Jun 22, 2024
1 parent 26062c8 commit 79fc376
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build
on:
push:
branches:
- main
- github-build

jobs:
build_ios_without_signing_tvos:
name: Build Expo (iOS) Without Signing
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
- name: Prebuild iOS
run: npx expo prebuild -p ios --clean
- name: Build Expo IPA
run: |
cd ios
xcodebuild -scheme reacttube -workspace reacttube.xcworkspace -configuration release archive -archivePath reacttube.xcarchive CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
../scripts/xcarchive_to_ipa.sh reacttube.xcarchive
- name: Upload IPA
uses: actions/upload-artifact@v2
with:
name: ios_ipa
path: ios/*.ipa
24 changes: 24 additions & 0 deletions scripts/xcarchive_to_ipa.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

if [ $# -eq 0 ]; then
echo "Error: No argument provided. Please provide at least one argument."
exit 1
fi

first_arg=$1
source_dir="${first_arg%/}/Products/Applications"

if [ ! -d "$source_dir" ]; then
echo "Error: Source directory does not exist."
exit 1
fi


new_folder="Payload"
rm -rf $new_folder
mkdir $new_folder

cp -a $source_dir/* $new_folder

filename=$(find $new_folder -type d -name '*.app' -exec basename {} \; | head -n 1)
zip -rmq "${filename%.*}.ipa" $new_folder

0 comments on commit 79fc376

Please sign in to comment.