@@ -222,17 +222,42 @@ To manually trigger with specific options:
222222
223223---
224224
225- ## Step 9: Create Draft GitHub Release
225+ ## Step 9: Always Create or Update the Draft GitHub Release
226226
227- If not using the automated workflow, create manually:
227+ This step is mandatory for every release, including a dry-run. The release
228+ workflow deliberately skips GitHub release creation when ` dry_run ` is enabled,
229+ so the agent must create the GitHub draft independently instead of assuming the
230+ workflow will do it.
231+
232+ Put the approved release notes directly in the GitHub draft release. Do not
233+ create or commit ` RELEASE_NOTES.md ` (or another repository file) to carry the
234+ notes. Pass them through standard input instead:
228235
229236``` bash
230- gh release create {version_tag} \
231- --draft \
232- --title " TensorDict {version_tag}" \
233- --notes-file RELEASE_NOTES.md
237+ version_tag=" {version_tag}"
238+ release_branch=" release/{version_without_v}"
239+
240+ if gh release view " $version_tag " > /dev/null 2>&1 ; then
241+ printf ' %s\n' " $release_notes " | gh release edit " $version_tag " \
242+ --draft \
243+ --target " $release_branch " \
244+ --title " TensorDict $version_tag " \
245+ --notes-file -
246+ else
247+ printf ' %s\n' " $release_notes " | gh release create " $version_tag " \
248+ --draft \
249+ --target " $release_branch " \
250+ --title " TensorDict $version_tag " \
251+ --notes-file -
252+ fi
234253```
235254
255+ Use the exact notes approved in Step 2 for ` release_notes ` . Afterward, verify
256+ that the release exists on GitHub, remains unpublished, has ` draft: true ` , and
257+ targets the release branch. An ` untagged-... ` URL is expected when the draft is
258+ created before its tag exists. Do not publish the release; leave that action for
259+ the manual post-release step below.
260+
236261---
237262
238263## Step 10: Monitor Workflow
@@ -242,7 +267,9 @@ Watch the release workflow for:
2422671 . ** Sanity checks** - Verify all version files match
2432682 . ** Wheel builds** - All platforms should succeed
2442693 . ** Docs update** - Stable symlink updated
245- 4 . ** Release creation** - Draft created with wheels
270+ 4 . ** Release creation** - In a real run, wheels are attached to the existing
271+ draft; in a dry-run, confirm the agent-created draft still exists even though
272+ no wheels are attached
246273
247274---
248275
0 commit comments