-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add github build for unsigned ipa (tvOS) and apk phone variant (…
…#26)
- Loading branch information
1 parent
f096a04
commit 5798f84
Showing
4 changed files
with
157 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Set TV as parameter | ||
description: Configure isTV in app.json | ||
|
||
inputs: | ||
is-tv: | ||
description: 'Boolean if isTV prebuild is wanted' | ||
required: true | ||
default: 'false' | ||
platform: | ||
description: 'Platform to prebuild - android or ios' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup | ||
uses: ./.github/actions/setup | ||
- name: Configure isTV in app.json | ||
run: jq --argjson variable $EXPO_TV '.expo.plugins[0][1].isTV |= $variable | .expo.plugins[2][1].isTV |= $variable' app.json | sponge app.json | ||
shell: bash | ||
env: | ||
EXPO_TV: ${{ inputs.is-tv }} | ||
- name: Prebuild native files | ||
run: npx expo prebuild -p $EXPO_PLATFORM --clean | ||
shell: bash | ||
env: | ||
EXPO_PLATFORM: ${{ inputs.platform }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
name: Build | ||
on: | ||
# push: | ||
# branches: | ||
# - main | ||
workflow_dispatch: # Ermöglicht manuelle Auslöser | ||
release: | ||
types: [ published ] | ||
|
||
jobs: | ||
build_ios_without_signing_tvos: | ||
name: Build Expo (tvOS) Without Signing | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Set up Homebrew | ||
id: set-up-homebrew | ||
uses: Homebrew/actions/setup-homebrew@master | ||
- name: Install sponge | ||
run: brew install sponge | ||
- name: Setup | ||
uses: ./.github/actions/prebuild | ||
with: | ||
is-tv: 'true' | ||
platform: "ios" | ||
- 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@v4 | ||
with: | ||
name: tvos_ipa | ||
path: ios/*.ipa | ||
- name: Upload IPA to Release | ||
if: ${{ github.event_name == 'release' }} | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ios/*.ipa | ||
# build_ios_without_signing_phone: # Disabled as the compile phase throws an error | ||
# name: Build Expo (iOS) Without Signing | ||
# runs-on: macos-latest | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v4 | ||
# - name: Set up Homebrew | ||
# id: set-up-homebrew | ||
# uses: Homebrew/actions/setup-homebrew@master | ||
# - name: Install sponge | ||
# run: brew install sponge | ||
# - name: Setup | ||
# uses: ./.github/actions/prebuild | ||
# with: | ||
# is-tv: 'false' | ||
# platform: "ios" | ||
# - 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@v4 | ||
# with: | ||
# name: ios_ipa | ||
# path: ios/*.ipa | ||
# - name: Upload IPA to Release | ||
# if: ${{ github.event_name == 'release' }} | ||
# uses: softprops/action-gh-release@v1 | ||
# with: | ||
# files: ios/*.ipa | ||
build_apk_without_signing_phone: | ||
name: Build Expo Android Phone | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Setup JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
- name: Install moreutils | ||
run: sudo apt-get install moreutils | ||
- name: Setup | ||
uses: ./.github/actions/prebuild | ||
with: | ||
is-tv: 'false' | ||
platform: "android" | ||
- name: Build Expo Android | ||
run: | | ||
cd android | ||
./gradlew assembleRelease | ||
- name: Upload IPA | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: android_phone_apk | ||
path: android/app/build/outputs/apk/release/*.apk | ||
- name: Upload IPA to Release | ||
if: ${{ github.event_name == 'release' }} | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: android/app/build/outputs/apk/release/*.apk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |