Skip to content

Commit 0f086d2

Browse files
fix: Force push release tag after rebase and configure append body for release notes.
1 parent 2b986cf commit 0f086d2

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,12 @@ jobs:
8080
git fetch origin "$BRANCH_NAME"
8181
git rebase "origin/$BRANCH_NAME"
8282
83+
# Re-create the tag to point to HEAD after rebase (bump-version.sh creates it before rebase)
84+
# This ensures the tag points to a commit that's actually on the branch
85+
git tag -f -a "v$VERSION" -m "$(git tag -l --format='%(contents)' "v$VERSION" 2>/dev/null || echo "Release v$VERSION")"
86+
8387
git push origin "$BRANCH_NAME" --force-with-lease
84-
git push origin "v$VERSION"
88+
git push origin "v$VERSION" --force
8589
8690
# Capture the new commit SHA after amendment
8791
echo "NEW_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
@@ -220,9 +224,9 @@ jobs:
220224
name: v${{ steps.version.outputs.VERSION }}
221225
target_commitish: ${{ env.NEW_SHA || github.sha }}
222226
generate_release_notes: ${{ steps.tag_message.outputs.GENERATE_NOTES }}
227+
append_body: ${{ steps.tag_message.outputs.GENERATE_NOTES }}
223228
body: |
224229
${{ steps.tag_message.outputs.MESSAGE }}
225-
226230
---
227231
**SHA256:** `${{ steps.sha.outputs.SHA256 }}`
228232
files: MiddleDrag-${{ steps.version.outputs.VERSION }}.zip

0 commit comments

Comments
 (0)