Skip to content

Commit 4c8decb

Browse files
committed
fix: default branch
1 parent f0bce52 commit 4c8decb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/create-release-pr.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ jobs:
4343
- name: Get release notes
4444
id: release-notes
4545
run: |
46+
# Get the default branch
47+
DEFAULT_BRANCH=$(gh api repos/${{ github.repository }} --jq '.default_branch')
48+
4649
# Get the last tag
4750
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
4851
if [ -z "$LAST_TAG" ]; then
@@ -55,7 +58,7 @@ jobs:
5558
-H "Accept: application/vnd.github+json" \
5659
/repos/${{ github.repository }}/releases/generate-notes \
5760
-f tag_name="v${{ env.VERSION }}" \
58-
-f target_commitish="master" \
61+
-f target_commitish="$DEFAULT_BRANCH" \
5962
-f previous_tag_name="${LAST_TAG}" | jq -r '.body')
6063
6164
# Save to file to handle multiline content

0 commit comments

Comments
 (0)