Add target_commitish to release API call

Without target_commitish, GitHub creates an untagged release
even when the tag exists.
This commit is contained in:
rcourtman 2025-11-23 09:37:35 +00:00
parent db120a8e9b
commit 9dc7990fbe

View file

@ -428,9 +428,11 @@ jobs:
# Use GitHub API directly to create release with existing tag # Use GitHub API directly to create release with existing tag
# gh release create has issues when tag already exists # gh release create has issues when tag already exists
# Must include target_commitish to link to existing tag
RELEASE_JSON=$(gh api "repos/${{ github.repository }}/releases" \ RELEASE_JSON=$(gh api "repos/${{ github.repository }}/releases" \
-X POST \ -X POST \
-F tag_name="${TAG}" \ -F tag_name="${TAG}" \
-F target_commitish="${{ github.sha }}" \
-F name="Pulse ${TAG}" \ -F name="Pulse ${TAG}" \
-F body="$(cat $NOTES_FILE)" \ -F body="$(cat $NOTES_FILE)" \
-F draft=true) -F draft=true)