File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,17 +90,15 @@ jobs:
9090 cd examples/RNOneSignalTS
9191 bun run setup
9292
93- - name : Get current native SDK versions
93+ - name : Get current native SDK versions from target branch
9494 id : current_versions
9595 run : |
96- # Current React Native version
97- CURRENT_VERSION=$(jq -r .version package.json)
96+ git fetch origin ${{ inputs.target_branch }}
9897
99- # Extract current Android SDK version
100- ANDROID_VERSION=$(grep "api 'com.onesignal:OneSignal:" android/build.gradle | sed -E "s/.*OneSignal:([0-9.]+).*/\1/")
101-
102- # Extract current iOS SDK version
103- IOS_VERSION=$(grep "OneSignalXCFramework" react-native-onesignal.podspec | sed -E "s/.*'([0-9.]+)'.*/\1/")
98+ # Get versions from target branch (not the release branch)
99+ CURRENT_VERSION=$(git show origin/${{ inputs.target_branch }}:package.json | jq -r .version)
100+ ANDROID_VERSION=$(git show origin/${{ inputs.target_branch }}:android/build.gradle | grep "api 'com.onesignal:OneSignal:" | sed -E "s/.*OneSignal:([0-9.]+).*/\1/")
101+ IOS_VERSION=$(git show origin/${{ inputs.target_branch }}:react-native-onesignal.podspec | grep "OneSignalXCFramework" | sed -E "s/.*'([0-9.]+)'.*/\1/")
104102
105103 echo "rn_from=$CURRENT_VERSION" >> $GITHUB_OUTPUT
106104 echo "android_from=$ANDROID_VERSION" >> $GITHUB_OUTPUT
You can’t perform that action at this time.
0 commit comments