Skip to content

ci: mark releases before 1.0.0 as prereleases - #331

Merged
uniqueg merged 2 commits into
devfrom
ci/prerelease-before-1.0
Oct 21, 2026
Merged

uniqueg merged 2 commits into
devfrom
ci/prerelease-before-1.0

Conversation

@uniqueg

@uniqueg uniqueg commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Releases are marked as GitHub pre-releases until 1.0.0 (the convention
already applied by hand to all existing FOCA releases, v0.12.0 to v0.15.0).
The release workflow derived a single prerelease flag (tags ending in
aN, bN or rcN) that decided both the GitHub pre-release label and the
latest Docker image. It is now split:

  • prerelease (gh release create --prerelease): aN/bN/rcN tags or
    major version 0.
  • stable (Docker latest tag): no aN/bN/rcN suffix, i.e., what
    prerelease == false meant before. Images of 0.x releases are tagged
    exactly as before.

The README "Releasing" section is updated accordingly.

Resulting behaviour

Tag GitHub pre-release Docker latest GitHub "Latest"
v0.15.0 (highest stable) yes yes no
v0.14.1 (not the highest) yes no no
v0.16.0rc1 yes no no
v1.0.0rc1 yes no no
v1.0.0 (highest stable) no yes yes
v1.0.1 (not the highest, e.g., after v1.1.0) no no see below

GitHub never marks a pre-release as "Latest". The workflow passes no
--latest flag (unchanged), so gh sends no make_latest and there is no
contradictory flag combination with --prerelease. For non-pre-releases
from 1.0.0 on, "Latest" is left to GitHub's default, as before (a stable
patch release of an older minor version may then be marked "Latest"; this
is pre-existing and out of scope here). The repository currently has no
"Latest" release (all releases are pre-releases), so nothing changes for
existing releases.

Verification

  • actionlint 1.7.7 (release binary, checksum verified; not configured in
    the repository): no findings, before and after the change.
  • Two review rounds (adversarial + quality, then adversarial); fixed:
    stable computed once and prerelease derived from it, README wording.
  • The flag logic, extracted into a script, gives the expected stable /
    prerelease values for v0.15.0, v0.15.1rc1, v0.3.0a2, v0.0.1,
    v1.0.0, v1.0.0rc1, v1.2.3b1, v10.0.0.
  • pre-commit hooks that apply to the changed files (check-yaml, trailing
    whitespace, end of file): pass. Tests are unaffected (workflow and README
    changes only).
  • CI: all checks pass, except the allowed-to-fail MongoDB 8.0 unit test job
    (known kernel incompatibility).

Declined review findings

  • Adversarial review (medium): "Latest" would stay on the last pre-change
    release until 1.0.0. Declined: all existing releases (v0.12.0 to v0.15.0)
    are already pre-releases and the repository has no "Latest" release
    (checked via the releases API).
  • Adversarial review (low): on reruns, an existing release keeps its
    pre-release flag. Declined: pre-existing, and only relevant for releases
    created by hand.
  • Adversarial review round 2 (outside this diff): from 1.0.0 on, a stable
    patch release of an older minor version may be marked "Latest", since no
    --latest flag is passed. Declined here: pre-existing and irrelevant
    before 1.0.0; could be a follow-up (--latest=false unless the tag is the
    highest stable one).

Open questions

None.

🤖 Generated with Claude Code

uniqueg and others added 2 commits October 21, 2026 12:57
Split the release flag in two: `prerelease` (GitHub pre-release) is
now also true for all releases with major version 0, while the new
`stable` flag (no alpha, beta or release candidate suffix) decides
whether the image is tagged `latest`, as `prerelease` did before.
Images of 0.x releases are thus tagged exactly as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Address review findings: compute `stable` once and derive `prerelease`
from it, and describe which tags update the `latest` image and which
are GitHub pre-releases without overloading "pre-release".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The release workflow now independently determines GitHub pre-release status and Docker latest eligibility: all pre-1.0.0 releases are GitHub pre-releases, while only non-suffixed stable versions can receive Docker latest. The README is updated to describe these rules.

Flow diagram for release classification and publishing

flowchart TD
    A[Release tag] --> B[Compute stable]
    B -->|alpha beta or rc suffix| C[stable=false]
    B -->|no alpha beta or rc suffix| D[stable=true]
    C --> E[prerelease=true]
    D --> F{Major version is 0?}
    F -->|yes| E
    F -->|no| G[prerelease=false]
    C --> H[No Docker latest]
    D --> I{Highest stable release?}
    I -->|yes| J[Push Docker latest]
    I -->|no| K[No Docker latest]
    E --> L[Create GitHub pre-release]
    G --> M[Create regular GitHub release]
Loading

File-Level Changes

Change Details Files
Separates GitHub pre-release status from Docker latest eligibility in the release workflow.
  • Adds a stable output based on the absence of alpha, beta, or release-candidate suffixes.
  • Marks stable-looking tags with major version 0 as GitHub pre-releases while retaining Docker latest behavior for stable versions.
  • Uses stable rather than GitHub pre-release status when deciding whether to publish Docker latest.
  • Passes the existing pre-release flag only to GitHub release creation, with no explicit --latest flag.
.github/workflows/release.yml
Documents the revised release and image-tagging policy.
  • Clarifies that Docker latest points to the highest stable release, excluding alpha, beta, and release-candidate versions.
  • States that all releases before 1.0.0, along with alpha, beta, and release-candidate versions, are GitHub pre-releases.
README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (43d9526) to head (c187e0a).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #331   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           24        24           
  Lines         1750      1750           
=========================================
  Hits          1750      1750           
Flag Coverage Δ
test_unit 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uniqueg
uniqueg marked this pull request as ready for review October 21, 2026 11:09

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. A normal release before 1.0.0 will be published on GitHub as a pre-release, which can change how users discover it. If that classification is wrong, the release can be corrected manually, but reverting the workflow will not change releases already published.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@uniqueg
uniqueg merged commit e2d1703 into dev Oct 21, 2026
13 of 14 checks passed
@uniqueg
uniqueg deleted the ci/prerelease-before-1.0 branch October 21, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant