@@ -188,13 +188,15 @@ jobs:
188188 echo "version=$VERSION" >> $GITHUB_OUTPUT
189189 echo "prior-version=$PRIOR_VERSION" >> $GITHUB_OUTPUT
190190
191- merge-change-log -to-main :
191+ update-apidiff-baseline -to-released-version :
192192 permissions :
193193 contents : write # for git push to PR branch
194194 runs-on : ubuntu-latest
195195 needs :
196196 - release
197197 steps :
198+ # add change log sync (if any) into this PR since the apidiff update
199+ # is required before any other PR can be merged anyway
198200 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
199201
200202 - name : Copy change log section from release branch
@@ -216,53 +218,6 @@ jobs:
216218 release_date=$(gh release view v$VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//')
217219 RELEASE_DATE=$release_date .github/scripts/merge-change-log-after-release.sh
218220
219- - name : Use CLA approved bot
220- run : .github/scripts/use-cla-approved-bot.sh
221-
222- - uses : actions/create-github-app-token@21cfef2b496dd8ef5b904c159339626a10ad380e # v1.11.6
223- id : otelbot-token
224- with :
225- app-id : ${{ vars.OTELBOT_APP_ID }}
226- private-key : ${{ secrets.OTELBOT_PRIVATE_KEY }}
227-
228- - name : Create pull request against main
229- env :
230- VERSION : ${{ needs.release.outputs.version }}
231- # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
232- GH_TOKEN : ${{ steps.otelbot-token.outputs.token }}
233- run : |
234- if git diff --quiet; then
235- if [[ $VERSION == *.0 ]]; then
236- echo there are no updates to merge, not creating pull request
237- exit 0 # success
238- else
239- echo patch release notes did not get applied for some reason
240- exit 1 # failure
241- fi
242- fi
243-
244- message="Merge change log updates from $GITHUB_REF_NAME"
245- body="Merge change log updates from \`$GITHUB_REF_NAME\`."
246- branch="otelbot/merge-change-log-updates-from-${GITHUB_REF_NAME//\//-}"
247-
248- git checkout -b $branch
249- git commit -a -m "$message"
250- git push --set-upstream origin $branch
251- gh pr create --title "$message" \
252- --body "$body" \
253- --base main
254-
255- update-apidiff-baseline-to-released-version :
256- permissions :
257- contents : write # for git push to PR branch
258- runs-on : ubuntu-latest
259- needs :
260- - release
261- steps :
262- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
263- with :
264- ref : main
265-
266221 - name : Wait for release to be available in maven central
267222 env :
268223 VERSION : ${{ needs.release.outputs.version }}
0 commit comments