-
Notifications
You must be signed in to change notification settings - Fork 358
[Infra] Create releases as drafts before publish #3587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Rather than rely on `gh release` doing the right thing and to make the code more explicit, create releases as drafts, then edit them to not be a draft to release them. This matches the effective behaviour in open-telemetry/opentelemetry-dotnet. Relates to open-telemetry#3584.
Add clarifying comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR modifies the release creation workflow to create GitHub releases as drafts before publishing them, ensuring that all assets are uploaded before the release becomes immutable.
Key Changes:
- Adds
--draftflag to both prerelease and stable release creation commands - Introduces
gh release edit $tag --draft=falsecommand to publish the draft after creation - Adds explanatory comment about why drafts are used (immutable releases cannot have assets added after publish)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Relates to #3584.
Changes
Rather than rely on
gh releasedoing the right thing and to make the code more explicit, create releases as drafts, then edit them to not be a draft to release them.This matches the effective behaviour in open-telemetry/opentelemetry-dotnet (see open-telemetry/opentelemetry-dotnet#6748).
Merge requirement checklist
Unit tests added/updatedAppropriateCHANGELOG.mdfiles updated for non-trivial changesChanges in public API reviewed (if applicable)