File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -62,15 +62,24 @@ jobs:
6262 echo "PR_TITLE=$PR_TITLE" >> $GITHUB_ENV
6363
6464 - name : Create PR '${{ env.PR_TITLE }}'
65+ env :
66+ PR_BODY : |
67+ This PR was created to prepare for releasing ${{ env.TAG_PREFIX }}${{ env.RELEASE_VERSION }}.
68+
69+ Merging this PR will create the GitHub release ${{ env.TAG_PREFIX }}${{ env.RELEASE_VERSION }}.
6570 run : |
6671 PR_LABELS="automated-pr,${RELEASE_TYPE}-pr"
6772 for LABEL in $(echo $PR_LABELS | sed "s/,/ /g"); do gh label create $LABEL --force; done
6873 [[ ${PRE_RELEASE:false} == "true" ]] && gh label create 'pre-release' --force
6974
70- gh pr create \
71- --draft \
72- --base ${{ env.BRANCH_MAIN }} \
73- --head ${{ github.ref_name }} \
74- --title "${{ env.PR_TITLE }}" \
75- --label "${{ env.PR_LABELS }}" \
76- --fill
75+ PR_ID=$(gh pr list --state open --search "base:${{ env.BRANCH_MAIN }} head:${{ github.ref_name }}" | head -1 | cut -f1)
76+ [[ ! -z "$PR_ID" ]] && \
77+ gh pr create \
78+ --draft \
79+ --base "${{ env.BRANCH_MAIN }}" \
80+ --head "${{ github.ref_name }}" \
81+ --title "${{ env.PR_TITLE }}" \
82+ --body "${{ env.PR_BODY }}" \
83+ --label "${PR_LABELS}" \
84+ --fill \
85+ || echo "PR was created. Ignored!"
You can’t perform that action at this time.
0 commit comments