6060
6161 - name : Setup Environment
6262 uses : ./.github/actions/setup-environment
63- with :
64- gh_token : ${{ secrets.GITHUB_TOKEN }}
6563
6664 - name : Get current native SDK versions
6765 id : current_versions
@@ -140,7 +138,7 @@ jobs:
140138 ios_to : ${{ inputs.ios_version }}
141139
142140 draft-release :
143- needs : [prep, update-version]
141+ needs : [prep, update-version, create-pr ]
144142 runs-on : ubuntu-latest
145143 steps :
146144 - name : Checkout
@@ -150,8 +148,6 @@ jobs:
150148
151149 - name : Setup Environment
152150 uses : ./.github/actions/setup-environment
153- with :
154- gh_token : ${{ secrets.GITHUB_TOKEN }}
155151
156152 - name : Update Unity SDK version
157153 run : |
@@ -240,10 +236,27 @@ jobs:
240236 env :
241237 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
242238 run : |
243- release_notes=$(gh pr view "${{ github.event.pull_request.number }}" --json body -q '.body')
239+ # Find the PR with the release branch as head
240+ RELEASE_BRANCH="${{ needs.prep.outputs.release_branch }}"
241+ echo "Looking for PR with head branch: $RELEASE_BRANCH"
242+
243+ # Get PR number from the branch
244+ PR_NUMBER=$(gh pr list --head "$RELEASE_BRANCH" --json number -q '.[0].number' || echo "")
245+
246+ if [ -z "$PR_NUMBER" ]; then
247+ echo "⚠️ No PR found for branch $RELEASE_BRANCH"
248+ echo "RELEASE_NOTES=" >> $GITHUB_ENV
249+ exit 0
250+ fi
251+
252+ echo "Found PR #$PR_NUMBER"
253+ release_notes=$(gh pr view "$PR_NUMBER" --json body -q '.body')
254+
255+ echo "Raw RELEASE_NOTES contents:"
256+ echo "$release_notes"
244257
245258 cleaned_notes=$(echo "$release_notes" \
246- | awk '/^Update/{found=1} found' \
259+ | awk '/^- Update/{found=1} found' \
247260 | sed '/^- - -$/d' \
248261 | sed '/^[[:space:]]*$/d')
249262
0 commit comments