mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-19 16:27:37 +00:00
Fix: use GitHub API directly for release creation
gh release create doesn't work properly when the tag already exists - it creates an 'untagged' release instead of attaching to the existing tag. Using the API directly with POST to /releases fixes this.
This commit is contained in:
parent
1586f80208
commit
c50869023d
1 changed files with 8 additions and 9 deletions
17
.github/workflows/create-release.yml
vendored
17
.github/workflows/create-release.yml
vendored
|
|
@ -426,18 +426,17 @@ jobs:
|
|||
|
||||
echo "Creating draft release for ${TAG}..."
|
||||
|
||||
# Tag now exists, so gh release create will attach to it
|
||||
gh release create "${TAG}" \
|
||||
--draft \
|
||||
--title "Pulse ${TAG}" \
|
||||
--notes-file "$NOTES_FILE"
|
||||
# Use GitHub API directly to create release with existing tag
|
||||
# gh release create has issues when tag already exists
|
||||
RELEASE_JSON=$(gh api "repos/${{ github.repository }}/releases" \
|
||||
-X POST \
|
||||
-F tag_name="${TAG}" \
|
||||
-F name="Pulse ${TAG}" \
|
||||
-F body="$(cat $NOTES_FILE)" \
|
||||
-F draft=true)
|
||||
|
||||
rm -f "$NOTES_FILE"
|
||||
|
||||
# Get the release ID
|
||||
echo "Fetching release details..."
|
||||
RELEASE_JSON=$(gh api "repos/${{ github.repository }}/releases/tags/${TAG}")
|
||||
|
||||
RELEASE_ID=$(echo "$RELEASE_JSON" | jq -r '.id')
|
||||
RELEASE_URL=$(echo "$RELEASE_JSON" | jq -r '.html_url')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue