Skip to content

chore: keep previews and an older line's tag off GitHub's Latest - #48

Merged
CaffeinatedCoder merged 2 commits into
mainfrom
claude/release-latest-44
Oct 18, 2026
Merged

CaffeinatedCoder merged 2 commits into
mainfrom
claude/release-latest-44

Conversation

@CaffeinatedCoder

Copy link
Copy Markdown
Owner

Closes #44

Stacked on #45: the CONTRIBUTING.md "Releases on two lines" section this PR extends exists only there. Merge #45 first; this PR then retargets to main, which is when CI and the PR hygiene check run on it.

Problem

release.yml passed --prerelease for a version with a - suffix and otherwise let GitHub decide, and GitHub marks every new release Latest. With two supported lines, a v10.x patch tagged after v11.0.0 would take Latest and point the repository page at the LTS line, and a preview relied on the API refusing to make a prerelease Latest.

Change

  • .github/workflows/release.yml, step "Create the release if it does not exist": a preview gets --prerelease --latest=false. A stable tag gets --latest=false when the current Latest release (tagless gh release view --json tagName) is newer by sort -V. Otherwise it becomes Latest, as does the first release when none exists. Ported from CodoMetis.ValueRanges' release workflow; this file's structure and comments are kept.
  • ReleaseWiringConventionTests: new test Github_release_keeps_an_older_line_and_previews_off_latest. It reads the step's script lines (comments dropped, since the comment states both rules) and checks the order: the preview flags inside the *-* branch, --latest=false inside the sort -V guard in the else branch, and gh release create passing "${flags[@]}".
  • CLAUDE.md: the ReleaseWiringConventionTests row names the new check. CONTRIBUTING.md: a "GitHub's Latest release" bullet under "Releases on two lines".

Tests

  • dotnet test … --filter "TestCategory!=Integration": 337 passed.
  • Seeded against release.yml, restored after each. Each of these fails the new test: preview reduced to --prerelease, the older-line --latest=false removed, the sort -V guard removed with --latest=false made unconditional for stable tags, and "${flags[@]}" dropped from gh release create.
  • I ran the decision logic with a stubbed gh: 10.0.3 with Latest v11.0.0 → --latest=false; 11.0.1 with Latest v11.0.0 → becomes Latest; 11.0.0-preview.2 → --prerelease --latest=false; no Latest yet → becomes Latest; 10.0.10 with Latest v10.0.9 → becomes Latest (version sort, not string sort).

🤖 Generated with Claude Code

release.yml now publishes a preview with --prerelease --latest=false, and a
stable tag with --latest=false when the current Latest release is newer by
sort -V, so a 10.x patch tagged after 11.0.0 leaves Latest on the 11 line.
Ported from CodoMetis.ValueRanges' release workflow.

ReleaseWiringConventionTests reads the step's script lines, not its comment,
and checks each flag sits on its own branch.

Closes #44

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@CaffeinatedCoder CaffeinatedCoder added this to the 11.0.0 milestone Oct 18, 2026
@CaffeinatedCoder CaffeinatedCoder added chore Build, CI, packaging, refactoring with no behaviour change stacked Base is another open PR; merge in order, CI does not run until it targets main area/release Versioning, changelogs, release wiring labels Oct 18, 2026
Base automatically changed from claude/tracking-culture-f9bfa8 to main October 18, 2026 13:11
@CaffeinatedCoder CaffeinatedCoder removed the stacked Base is another open PR; merge in order, CI does not run until it targets main label Oct 18, 2026
@CaffeinatedCoder
CaffeinatedCoder merged commit 807fc9d into main Oct 18, 2026
@CaffeinatedCoder
CaffeinatedCoder deleted the claude/release-latest-44 branch October 18, 2026 13:14
CaffeinatedCoder added a commit that referenced this pull request Oct 18, 2026
Brings in #45 (tracking culture, two supported lines), #48 (Latest handling) and #53
(Dependabot build-only pins).

Conflicts: ChangelogConsistencyTests, PackagingConventionTests and
SecurityPolicyConsistencyTests, all resolved to main. 2085324 added a SemanticVersion
harness type here so the convention tests could read 11.0.0-preview.1; #45 solved the
same problem on main with ReleaseVersion (prerelease parsing, SemVer precedence, the
"## <version>" heading with a suffix) and made the security-policy checks aware of two
lines. SemanticVersion is unused after the merge and is removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/release Versioning, changelogs, release wiring chore Build, CI, packaging, refactoring with no behaviour change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

release.yml: keep previews and an older line's tag off GitHub's Latest

1 participant