Skip to content

Commit f1b75bf

Browse files
committed
fix(release): leave canonical public release pages untouched on resume
Codex review: the early draft-page creation could rewrite an already-public release with the proofless prepublish body, stripping its verification section until the proof append re-ran — a failed resume would leave the public page proofless. create_or_update now no-ops when the existing page is public and already canonical (the state guard_existing_public_release vetted); drafts still get refreshed notes.
1 parent 8d66e47 commit f1b75bf

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/openclaw-release-publish.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ jobs:
11051105
}
11061106
11071107
create_or_update_github_release() {
1108-
local release_version title latest_arg prerelease_arg
1108+
local existing_body_file existing_state release_version title latest_arg prerelease_arg
11091109
verify_release_tag_target
11101110
release_version="${RELEASE_TAG#v}"
11111111
title="openclaw ${release_version}"
@@ -1118,7 +1118,19 @@ jobs:
11181118
latest_arg="--latest"
11191119
fi
11201120
1121-
if gh release view "${RELEASE_TAG}" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
1121+
if existing_state="$(gh release view "${RELEASE_TAG}" --repo "$GITHUB_REPOSITORY" --json isDraft,body 2>/dev/null)"; then
1122+
# A public page only reaches this call after
1123+
# guard_existing_public_release accepted it as canonical; leave
1124+
# it untouched so a failed resume cannot strip its verification
1125+
# proof before the proof append re-runs.
1126+
if [[ "$(printf '%s' "${existing_state}" | jq -r '.isDraft')" != "true" ]]; then
1127+
existing_body_file="${RUNNER_TEMP}/existing-public-release-notes.md"
1128+
printf '%s' "$(printf '%s' "${existing_state}" | jq -r '.body')" > "${existing_body_file}"
1129+
if canonical_release_body_matches "${existing_body_file}"; then
1130+
echo "- GitHub release: existing public page left untouched until proof append" >> "$GITHUB_STEP_SUMMARY"
1131+
return 0
1132+
fi
1133+
fi
11221134
gh release edit "${RELEASE_TAG}" --repo "$GITHUB_REPOSITORY" \
11231135
--title "${title}" \
11241136
--notes-file "${prepared_release_notes_file}" \

0 commit comments

Comments
 (0)