ci: draft the GitHub Release page from the CHANGELOG on tag - #389
Merged
Conversation
release.yml only published to PyPI; creating the Release page was an undocumented manual step, and v1.2.2 shipped to PyPI without one. A second job, gated on a successful upload, now drafts the page: title "EverOS X.Y.Z", body lifted from the matching CHANGELOG section with the group headings demoted to h2, `--prerelease` for PEP 440 suffixed tags. It stays a draft because the lead summary that opens every EverOS release page is prose CI cannot write. The job runs separately from the publish job so that one keeps `contents: read` alongside its OIDC token. A stable tag with no CHANGELOG section fails the job rather than publishing an empty page; pre-releases fall back to a placeholder. Existing releases are detected through the list endpoint, since the by-tag endpoint cannot see drafts (cli/cli#3037) and a re-run would 422 — a stale draft is replaced, a published release left alone. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Every EverOS release page since 1.1.3 closes with an Upgrade section — the pip line, any migration notes, and a compare link to the previous tag. The first draft dropped it, so a published page would have lost the one section readers act on. The pip line and the compare link are prefilled; the previous tag comes from `git tag --sort=-v:refname`, which needs the full tag list, hence fetch-depth: 0. Migration notes stay hand-written next to the lead summary, since only a human knows whether a release needs them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Flipping `draft` through the API without `tag_name` rebinds the release to the `untagged-<hash>` placeholder and creates a git tag by that name against the default branch. Hit while publishing 1.2.2; the web UI button is unaffected. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
release.ymlonly published to PyPI. Creating the GitHub Release page was a manual step that no workflow performed and no doc mentioned — sov1.2.2went out to PyPI with no release page, which is what prompted this.A second job now drafts the page after a successful upload:
EverOS X.Y.Z; body lifted from the matching## [X.Y.Z]CHANGELOG section, with the### Addedgroup headings demoted to##to match the existing pages.--prerelease --latest=falsefor PEP 440 suffixed tags, so an rc can never become/releases/latest.Design notes:
contents: readnext to its OIDC token, and so no page appears for a version that failed to upload.This mirrors what Raven has done for ten releases, with the body sourced from the CHANGELOG rather than a mostly-TODO template.
Area
Verification
Both steps were extracted from the workflow YAML and executed locally — the extraction step against the real
CHANGELOG.md, the shell step underbash -eagainst a stubbedgh.The first draft of the shell step used
[ cond ] && assign, which fails abash -estep when the test is false; the stubbed run caught it and it is now anif.v1.2.2's page was created by hand from the same CHANGELOG section this job extracts, as a draft awaiting its lead summary.Checklist
main..envfiles, dependency folders, or generated output.Notes for Reviewers
/releasegains a step 8 (write the lead summary, click Publish) and a warning about thereleases/tag/untagged-<hash>draft URL, which keeps serving a stale page after publication with no redirect.The workflow can only be exercised for real by pushing a tag. If you would rather validate it end to end before the next release, a throwaway
v1.2.3rc1tag exercises the whole path without touching/releases/latest— the rc release and tag get deleted afterward.🤖 Generated with Claude Code