Skip to content

Commit e0acfbd

Browse files
committed
Add pull request trigger to release drafter workflow
1 parent 6db946f commit e0acfbd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/release-drafter.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
push:
55
branches:
66
- main
7+
pull_request:
78
workflow_dispatch:
89

910
jobs:
1011
update_release_draft:
11-
if: ${{ !contains(github.head_ref, 'doc/changelog-update-') && startsWith(github.event.head_commit.message, 'Merge pull request') }}
1212
permissions:
1313
contents: write
1414
pull-requests: write
@@ -28,6 +28,8 @@ jobs:
2828
echo "This commit is not target. Skip the workflow."
2929
echo "SKIP_JOB=true" >> $GITHUB_OUTPUT
3030
else
31+
echo "This commit is target."
32+
echo ${{ github.event.head_commit.message }}
3133
echo "SKIP_JOB=false" >> $GITHUB_OUTPUT
3234
fi
3335
- uses: release-drafter/release-drafter@v6
@@ -104,5 +106,6 @@ jobs:
104106
exit 0
105107
fi
106108
git commit -am "Update Version With Release Draft - $REPLACE_VERSION"
107-
git push origin main
109+
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
110+
git push origin $BRANCH_NAME
108111

0 commit comments

Comments
 (0)