Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GH Action to run iOS build #407

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build app

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build-ios:
name: Build iOS app
# if: github.event.pull_request.draft == false
runs-on: macos-12

steps:
- name: Check out Git repository
uses: actions/checkout@v3

# - name: Select Xcode version
# run: sudo xcode-select -s /Applications/Xcode_13.4.1.app

- name: Set up Node.js
uses: actions/setup-node@v3.5.1
with:
node-version: 14
check-latest: true
cache: npm

- name: Set up CocoaPods cache
uses: actions/cache@v3
with:
path: ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-

- name: Install Node.js dependencies
run: npm ci --no-audit

- name: Run expo prebuild
run: npx expo-cli prebuild --clean --platform ios

- name: Build app
run: |
cd ios
xcodebuild archive \
-workspace "Jellyfin.xcworkspace" \
-scheme "Jellyfin" \
-configuration Release \
-archivePath build/Jellyfin.xcarchive \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO

- name: Build app archive
run: |
cd ios/build
ls -Alh Jellyfin.xcarchive/Products
cp -r Jellyfin.xcarchive/Products/Applications ./Payload
zip -r Jellyfin.ipa Payload

- name: Upload app archive
uses: actions/upload-artifact@v3
with:
name: archive
path: ios/build/Jellyfin.ipa
6 changes: 3 additions & 3 deletions components/AudioPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

import { Audio } from 'expo-av';
import { Audio, InterruptionModeAndroid, InterruptionModeIOS } from 'expo-av';
import { observer } from 'mobx-react-lite';
import React, { useEffect, useState } from 'react';

Expand All @@ -21,10 +21,10 @@ const AudioPlayer = observer(() => {
useEffect(() => {
Audio.setAudioModeAsync({
staysActiveInBackground: true,
interruptionModeAndroid: Audio.INTERRUPTION_MODE_ANDROID_DO_NOT_MIX,
interruptionModeAndroid: InterruptionModeAndroid.DoNotMix,
playThroughEarpieceAndroid: false,
shouldDuckAndroid: true,
interruptionModeIOS: Audio.INTERRUPTION_MODE_IOS_DO_NOT_MIX,
interruptionModeIOS: InterruptionModeIOS.DoNotMix,
playsInSilentModeIOS: true
});

Expand Down
6 changes: 3 additions & 3 deletions components/VideoPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { Audio, Video } from 'expo-av';
import { Audio, InterruptionModeAndroid, InterruptionModeIOS, Video } from 'expo-av';
import { observer } from 'mobx-react-lite';
import React, { useEffect, useRef, useState } from 'react';
import { Alert } from 'react-native';
Expand All @@ -23,8 +23,8 @@ const VideoPlayer = observer(() => {
// Set the audio mode when the video player is created
useEffect(() => {
Audio.setAudioModeAsync({
interruptionModeAndroid: Audio.INTERRUPTION_MODE_ANDROID_DO_NOT_MIX,
interruptionModeIOS: Audio.INTERRUPTION_MODE_IOS_DO_NOT_MIX,
interruptionModeAndroid: InterruptionModeAndroid.DoNotMix,
interruptionModeIOS: InterruptionModeIOS.DoNotMix,
playsInSilentModeIOS: true
});
}, []);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ true;
},
]
}
textInteractionEnabled={true}
useSharedProcessPool={true}
useWebKit={true}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ exports[`RefreshWebView should render 1`] = `
},
]
}
textInteractionEnabled={true}
useSharedProcessPool={true}
/>
</View>
Expand Down
34 changes: 14 additions & 20 deletions components/__tests__/__snapshots__/ServerInput.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ exports[`ServerInput should render correctly 1`] = `
}
>
<View
collapsable={false}
style={
Object {
"alignItems": "center",
Expand Down Expand Up @@ -63,7 +64,6 @@ exports[`ServerInput should render correctly 1`] = `
</View>
</View>
<TextInput
allowFontScaling={true}
autoCapitalize="none"
autoCompleteType="off"
autoCorrect={false}
Expand All @@ -73,7 +73,6 @@ exports[`ServerInput should render correctly 1`] = `
onChangeText={[Function]}
onSubmitEditing={[Function]}
placeholderTextColor="#86939e"
rejectResponderTermination={true}
returnKeyType="go"
selectionColor="#2089dc"
style={
Expand Down Expand Up @@ -112,6 +111,7 @@ exports[`ServerInput should show error if parseUrl throws 1`] = `
}
>
<View
collapsable={false}
style={
Object {
"alignItems": "center",
Expand Down Expand Up @@ -161,6 +161,7 @@ exports[`ServerInput should show error if parseUrl throws 1`] = `
>
<Text
allowFontScaling={false}
selectable={false}
style={
Array [
Object {
Expand All @@ -187,7 +188,6 @@ exports[`ServerInput should show error if parseUrl throws 1`] = `
</View>
</View>
<TextInput
allowFontScaling={true}
autoCapitalize="none"
autoCompleteType="off"
autoCorrect={false}
Expand All @@ -197,7 +197,6 @@ exports[`ServerInput should show error if parseUrl throws 1`] = `
onChangeText={[Function]}
onSubmitEditing={[Function]}
placeholderTextColor="#86939e"
rejectResponderTermination={true}
returnKeyType="go"
selectionColor="#2089dc"
style={
Expand Down Expand Up @@ -238,6 +237,7 @@ exports[`ServerInput should show error if url is invalid 1`] = `
}
>
<View
collapsable={false}
style={
Object {
"alignItems": "center",
Expand Down Expand Up @@ -287,6 +287,7 @@ exports[`ServerInput should show error if url is invalid 1`] = `
>
<Text
allowFontScaling={false}
selectable={false}
style={
Array [
Object {
Expand All @@ -313,7 +314,6 @@ exports[`ServerInput should show error if url is invalid 1`] = `
</View>
</View>
<TextInput
allowFontScaling={true}
autoCapitalize="none"
autoCompleteType="off"
autoCorrect={false}
Expand All @@ -323,7 +323,6 @@ exports[`ServerInput should show error if url is invalid 1`] = `
onChangeText={[Function]}
onSubmitEditing={[Function]}
placeholderTextColor="#86939e"
rejectResponderTermination={true}
returnKeyType="go"
selectionColor="#2089dc"
style={
Expand Down Expand Up @@ -364,6 +363,7 @@ exports[`ServerInput should show error when input is blank 1`] = `
}
>
<View
collapsable={false}
style={
Object {
"alignItems": "center",
Expand Down Expand Up @@ -413,6 +413,7 @@ exports[`ServerInput should show error when input is blank 1`] = `
>
<Text
allowFontScaling={false}
selectable={false}
style={
Array [
Object {
Expand All @@ -439,7 +440,6 @@ exports[`ServerInput should show error when input is blank 1`] = `
</View>
</View>
<TextInput
allowFontScaling={true}
autoCapitalize="none"
autoCompleteType="off"
autoCorrect={false}
Expand All @@ -449,7 +449,6 @@ exports[`ServerInput should show error when input is blank 1`] = `
onChangeText={[Function]}
onSubmitEditing={[Function]}
placeholderTextColor="#86939e"
rejectResponderTermination={true}
returnKeyType="go"
selectionColor="#2089dc"
style={
Expand Down Expand Up @@ -490,6 +489,7 @@ exports[`ServerInput should show error when url is undefined 1`] = `
}
>
<View
collapsable={false}
style={
Object {
"alignItems": "center",
Expand Down Expand Up @@ -539,6 +539,7 @@ exports[`ServerInput should show error when url is undefined 1`] = `
>
<Text
allowFontScaling={false}
selectable={false}
style={
Array [
Object {
Expand All @@ -565,7 +566,6 @@ exports[`ServerInput should show error when url is undefined 1`] = `
</View>
</View>
<TextInput
allowFontScaling={true}
autoCapitalize="none"
autoCompleteType="off"
autoCorrect={false}
Expand All @@ -575,7 +575,6 @@ exports[`ServerInput should show error when url is undefined 1`] = `
onChangeText={[Function]}
onSubmitEditing={[Function]}
placeholderTextColor="#86939e"
rejectResponderTermination={true}
returnKeyType="go"
selectionColor="#2089dc"
style={
Expand Down Expand Up @@ -616,6 +615,7 @@ exports[`ServerInput should show error when url is whitespace 1`] = `
}
>
<View
collapsable={false}
style={
Object {
"alignItems": "center",
Expand Down Expand Up @@ -665,6 +665,7 @@ exports[`ServerInput should show error when url is whitespace 1`] = `
>
<Text
allowFontScaling={false}
selectable={false}
style={
Array [
Object {
Expand All @@ -691,7 +692,6 @@ exports[`ServerInput should show error when url is whitespace 1`] = `
</View>
</View>
<TextInput
allowFontScaling={true}
autoCapitalize="none"
autoCompleteType="off"
autoCorrect={false}
Expand All @@ -701,7 +701,6 @@ exports[`ServerInput should show error when url is whitespace 1`] = `
onChangeText={[Function]}
onSubmitEditing={[Function]}
placeholderTextColor="#86939e"
rejectResponderTermination={true}
returnKeyType="go"
selectionColor="#2089dc"
style={
Expand Down Expand Up @@ -742,6 +741,7 @@ exports[`ServerInput should succeed for valid urls 1`] = `
}
>
<View
collapsable={false}
style={
Object {
"alignItems": "center",
Expand Down Expand Up @@ -791,6 +791,7 @@ exports[`ServerInput should succeed for valid urls 1`] = `
>
<Text
allowFontScaling={false}
selectable={false}
style={
Array [
Object {
Expand All @@ -817,7 +818,6 @@ exports[`ServerInput should succeed for valid urls 1`] = `
</View>
</View>
<TextInput
allowFontScaling={true}
autoCapitalize="none"
autoCompleteType="off"
autoCorrect={false}
Expand All @@ -827,7 +827,6 @@ exports[`ServerInput should succeed for valid urls 1`] = `
onChangeText={[Function]}
onSubmitEditing={[Function]}
placeholderTextColor="#86939e"
rejectResponderTermination={true}
returnKeyType="go"
selectionColor="#2089dc"
style={
Expand All @@ -854,12 +853,7 @@ exports[`ServerInput should succeed for valid urls 1`] = `
}
}
>
<ActivityIndicator
animating={true}
color="#999999"
hidesWhenStopped={true}
size="small"
/>
<ActivityIndicator />
</View>
</View>
<Text
Expand Down
12 changes: 6 additions & 6 deletions components/__tests__/__snapshots__/VideoPlayer.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ exports[`VideoPlayer should render correctly 1`] = `
}
>
<ViewManagerAdapter_ExpoVideoView
onError={[Function]}
onFullscreenUpdate={[Function]}
onLoad={[Function]}
onLoadStart={[Function]}
onReadyForDisplay={[Function]}
onStatusUpdate={[Function]}
proxiedProperties={
Object {
"onError": [Function],
"onFullscreenUpdate": [Function],
"onLoad": [Function],
"onLoadStart": [Function],
"onReadyForDisplay": [Function],
"onStatusUpdate": [Function],
"resizeMode": "mock",
"source": undefined,
"status": Object {},
Expand Down
Loading