File tree Expand file tree Collapse file tree
.github/actions/setup-deps Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,18 +38,21 @@ runs:
3838 if : inputs.react-version != '' && inputs.react-native-version != ''
3939 run : |
4040 RN_VERSION='${{ inputs.react-native-version }}'
41+ RN_MINOR="${RN_VERSION#0.}"
42+ RN_MINOR="${RN_MINOR%%.*}"
43+
4144 deps=(
4245 "react@${{ inputs.react-version }}"
4346 "@types/react@${{ inputs.react-version }}"
4447 "react-native@${RN_VERSION}"
4548 "@react-native/babel-preset@${RN_VERSION}"
4649 )
4750
48- if [[ "$RN_VERSION" =~ ^0\.([0-9]+)\. ]] && (( BASH_REMATCH[1] >= 85 )); then
51+ if (( RN_MINOR >= 85 )); then
4952 deps+=("@react-native/jest-preset@${RN_VERSION}")
50- yarn add -D "${deps[@]}"
5153 else
52- yarn remove -D @react-native/jest-preset
53- yarn add -D "${deps[@]}"
54+ yarn remove @react-native/jest-preset
5455 fi
56+
57+ yarn add -D "${deps[@]}"
5558 shell : bash
You can’t perform that action at this time.
0 commit comments