@@ -3,6 +3,10 @@ name: Create Release PR
33on :
44 # For making a release pr from android / ios sdk actions
55 workflow_call :
6+ secrets :
7+ GH_PUSH_TOKEN :
8+ required : false
9+ description : ' GitHub token for pushing changes'
610 inputs :
711 rn_version :
812 description : ' New React Native Version (e.g., 5.2.15 or 5.2.15-beta.1)'
2226 type : string
2327 default : main
2428
25- # For making a release pr from cordova github actions
29+ # For making a release pr from the github actions
2630 workflow_dispatch :
2731 inputs :
2832 rn_version :
4650jobs :
4751 prep :
4852 uses : OneSignal/sdk-actions/.github/workflows/prep-release.yml@main
53+ secrets :
54+ # Need this cross-repo token (sdk-actions & this repo) to perform changes
55+
56+ GH_PUSH_TOKEN : ${{ secrets.GH_PUSH_TOKEN }}
4957 with :
58+ target_repo : OneSignal/react-native-onesignal
5059 version : ${{ inputs.rn_version }}
5160
5261 # React Native specific steps
53- update-version :
62+ update_version :
5463 needs : prep
5564 runs-on : macos-latest
5665 outputs :
6271 - name : Checkout
6372 uses : actions/checkout@v5
6473 with :
74+ # Need repository otherwise caller would set github.repository to the caller itself (e.g. sdk-actions)
75+ repository : OneSignal/react-native-onesignal
6576 ref : ${{ needs.prep.outputs.release_branch }}
77+ token : ${{ secrets.GH_PUSH_TOKEN || github.token }}
6678
6779 - name : Setup Bun
6880 uses : oven-sh/setup-bun@v2
7991 - name : Get current native SDK versions
8092 id : current_versions
8193 run : |
82- # Current cordova version
94+ # Current React Native version
8395 CURRENT_VERSION=$(jq -r .version package.json)
8496
8597 # Extract current Android SDK version
@@ -147,12 +159,17 @@ jobs:
147159 git push
148160
149161 create-pr :
150- needs : [prep, update-version ]
162+ needs : [prep, update_version ]
151163 uses : OneSignal/sdk-actions/.github/workflows/create-release.yml@main
164+ secrets :
165+ # Need this cross-repo token (sdk-actions & this repo) to perform changes
166+ GH_PUSH_TOKEN : ${{ secrets.GH_PUSH_TOKEN }}
152167 with :
168+ # Need target_repo otherwise caller would set github.repository to the caller itself (e.g. sdk-actions)
169+ target_repo : OneSignal/react-native-onesignal
153170 release_branch : ${{ needs.prep.outputs.release_branch }}
154171 target_branch : ${{ inputs.target_branch }}
155- android_from : ${{ needs.update-version .outputs.android_from }}
172+ android_from : ${{ needs.update_version .outputs.android_from }}
156173 android_to : ${{ inputs.android_version }}
157- ios_from : ${{ needs.update-version .outputs.ios_from }}
174+ ios_from : ${{ needs.update_version .outputs.ios_from }}
158175 ios_to : ${{ inputs.ios_version }}
0 commit comments