mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-12 20:16:15 -08:00
ci(release): keep tag_name when patching rolling draft metadata
PATCHing a draft release without tag_name makes GitHub drop the pending tag (the draft turns into untagged-<hash>), so the next run cannot find the rolling draft by tag and creates a duplicate — observed live on this PR's own drafts. Include tag_name in both PATCH payloads of the metadata step. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0703f9dacb
commit
949ea5200d
1 file changed
+8
-2
@@ -1524,11 +1524,16 @@ jobs:
|
||||
-f target_commitish="${RELEASE_COMMITISH}" \
|
||||
--jq '.body' || true)"
|
||||
|
||||
# tag_name MUST be included in every PATCH: updating a draft
|
||||
# without it makes GitHub drop the pending tag (the draft
|
||||
# becomes "untagged-<hash>"), which breaks the rolling-draft
|
||||
# lookup on the next run.
|
||||
if [ -z "${GENERATED_NOTES}" ]; then
|
||||
jq -n \
|
||||
--arg tag "${RELEASE_TAG}" \
|
||||
--arg name "${RELEASE_NAME}" \
|
||||
--arg commitish "${RELEASE_COMMITISH}" \
|
||||
'{name: $name, target_commitish: $commitish}' |
|
||||
'{tag_name: $tag, name: $name, target_commitish: $commitish}' |
|
||||
gh api -X PATCH "repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}" --input - > /dev/null
|
||||
exit 0
|
||||
fi
|
||||
@@ -1540,8 +1545,9 @@ jobs:
|
||||
fi
|
||||
|
||||
jq -n \
|
||||
--arg tag "${RELEASE_TAG}" \
|
||||
--arg name "${RELEASE_NAME}" \
|
||||
--arg commitish "${RELEASE_COMMITISH}" \
|
||||
--arg body "${FULL_BODY}" \
|
||||
'{name: $name, target_commitish: $commitish, body: ($body | .[0:120000])}' |
|
||||
'{tag_name: $tag, name: $name, target_commitish: $commitish, body: ($body | .[0:120000])}' |
|
||||
gh api -X PATCH "repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}" --input - > /dev/null
|
||||
Reference in new issue
Block a user