Problem
When create_release_as_draft: true and draft_release_pr_reminder: true, the action posts a comment on the merged PR with a link to the draft release. However, the draft release URL breaks (404s) after the release is published since draft releases use a different URL format. The comment should be updated to reflect the published release with a working link.
Next Steps
Solution (implemented in PR #98)
Option 1: Single action, event-type branching — the action checks context.eventName and branches behavior:
- On
push → normal publish flow (existing behavior)
- On
release: [published] → find and update the draft comment, then return early
on:
push:
branches: [main]
release:
types: [published]
Example: Before (draft)
## 📦 Draft Release Created
A draft release **v3.1.1** has been created for this PR.
🔗 **[View Draft Release](https://github.com/.../releases/tag/untagged-...)**
### Next Steps
- [ ] Review the release notes
- [ ] Publish the release to make it permanent
Example: After (published)
## ✅ Release Published
Release **v3.1.1** has been published!
🔗 **[View Published Release](https://github.com/.../releases/tag/v3.1.1)**
### Next Steps
- [x] Review the release notes
- [x] Publish the release to make it permanent
Implementation Notes
- Version-specific HTML marker (
<!-- publish-github-action-draft:vX.Y.Z -->) for reliable comment matching
- Legacy fallback for comments without marker (heading + version match)
- Author filtering to only update our own comments
- Idempotency: skips if comment already shows published state
- Predictable tag URL (draft
untagged-... URLs 404 after publishing)
- Uses
retryWithBackoff on all API calls
- 13 tests covering all paths
Problem
When
create_release_as_draft: trueanddraft_release_pr_reminder: true, the action posts a comment on the merged PR with a link to the draft release. However, the draft release URL breaks (404s) after the release is published since draft releases use a different URL format. The comment should be updated to reflect the published release with a working link.Next Steps
Solution (implemented in PR #98)
Option 1: Single action, event-type branching — the action checks
context.eventNameand branches behavior:push→ normal publish flow (existing behavior)release: [published]→ find and update the draft comment, then return earlyExample: Before (draft)
Example: After (published)
Implementation Notes
<!-- publish-github-action-draft:vX.Y.Z -->) for reliable comment matchinguntagged-...URLs 404 after publishing)retryWithBackoffon all API calls