Skip to content

ci: publish homebrew formula for every stable release#2072

Open
chalabi2 wants to merge 5 commits into
mainfrom
ci/fix-homebrew-notify
Open

ci: publish homebrew formula for every stable release#2072
chalabi2 wants to merge 5 commits into
mainfrom
ci/fix-homebrew-notify

Conversation

@chalabi2

@chalabi2 chalabi2 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Problem

The homebrew tap stopped receiving akash formula updates after v2.0.1 (2026-03-23). v2.1.0 was released on 2026-06-08 but never reached the tap.

Root cause

The notify-homebrew job gates the tap dispatch on script/mainnet-from-tag.sh, which implements the old even minor = mainnet convention. That convention is obsolete: mainnet upgrades have shipped with odd minors since v1.1.0 (see net/mainnet/upgrades/ — v1.1.0, v2.1.0). As a result the dispatch step was silently skipped for v2.1.0 (run) — and historically for all of v1.1.x as well (the tap has no v1.1.x entry).

The same dead convention affects two other release paths (fixed here as well):

  • docker tags: IS_STABLE required IS_MAINNET, so v2.1.0's image was published as :latest instead of :stable (Makefile → make/releasing.mk.goreleaser.yaml).
  • release notes: genchangelog.sh restricted the changelog baseline to tags with the same minor parity, so v2.1.0's notes were generated against v1.1.1 instead of v2.0.1.

Release policy per PM: formulas publish for every stable tag, never for prereleases.

Changes

  • release.yaml: gate the homebrew notify only on is_prerelease.sh (strict equality so script failures fail closed), matching the equivalent gate in the provider repo. Prereleases (rc/alpha/aN) still never publish.
  • Delete dispatch.yaml: it fired on every push with an undefined RELEASE_TAG, flooding the tap with failing empty-tag dispatches (e.g. run). notify-homebrew in release.yaml is the real dispatch path.
  • Makefile: derive IS_STABLE from the prerelease check alone, so every stable release publishes :stable docker images.
  • genchangelog.sh: filter changelog tags only by stable vs prerelease, removing the even/odd parity matching.
  • Remove script/mainnet-from-tag.sh: no consumers remain.

The workflow ran on every push and dispatched the homebrew-tap "akash"
workflow with an undefined RELEASE_TAG, flooding the tap with failing
empty-tag runs. The notify-homebrew job in release.yaml is the actual
dispatch path for releases.

Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b3b7bf73-538c-4f71-938a-5a49d162968d

📥 Commits

Reviewing files that changed from the base of the PR and between 9e64460 and 2a18256.

📒 Files selected for processing (2)
  • script/genchangelog.sh
  • script/mainnet-from-tag.sh
💤 Files with no reviewable changes (1)
  • script/mainnet-from-tag.sh

Walkthrough

Simplifies release CI by gating Homebrew notifications solely on prerelease output; changes Makefile stable-flag logic to depend on prerelease only; updates changelog script comments and tag-filter regexes; and fixes tag minor-parity exit behavior so odd minors return non-zero.

Changes

Release flow and tooling

Layer / File(s) Summary
Homebrew notification condition simplification
.github/workflows/release.yaml
The check step outputs only is_prerelease, and the "notify homebrew with a new release" step condition now depends solely on steps.check.outputs.is_prerelease == '1'.
IS_STABLE determination
Makefile
IS_STABLE now defaults to false and is set to true when IS_PREREL is false; the IS_MAINNET variable and its prior gating were removed.
Changelog script docs and regexes
script/genchangelog.sh
Header clarifies prerelease vs release note categories; version_rel and version_prerel regexes are defined unconditionally using sourced semver helpers, replacing prior conditional patterns.
Minor version parity fix
script/mainnet-from-tag.sh
Fixes the minor-parity conditional to use `

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I hopped through YAML, Makefile, script, and tag,
Tweaked checks, smoothed regexes, fixed a parity snag.
Prerelease lights the pathway, stable flags stand true,
Odd minors now stumble — even hops bounce through.
Release sails on tidy tags, and I nibble a carrot too. 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: enabling Homebrew formula publication for all stable releases by removing obsolete version-parity logic.
Description check ✅ Passed The description clearly explains the problem (Homebrew tap missing v2.1.0 due to obsolete mainnet convention), root cause, and all changes made across five files to fix it.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/fix-homebrew-notify

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yaml:
- Line 97: The workflow gate currently uses
contains(steps.check.outputs.is_prerelease, '1') which performs substring
matching; replace it with a strict equality comparison so only the exact
sentinel triggers the job — change the if expression to use
steps.check.outputs.is_prerelease == '1' (i.e., replace contains(...) with a
strict == '1' check) in the if: conditional for the stable-tag gating.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: df2ca7b7-5b75-4686-886a-d9291d008fae

📥 Commits

Reviewing files that changed from the base of the PR and between 151b989 and 0d3dda4.

📒 Files selected for processing (3)
  • .github/workflows/dispatch.yaml
  • .github/workflows/release.yaml
  • script/mainnet-from-tag.sh
💤 Files with no reviewable changes (1)
  • .github/workflows/dispatch.yaml

Comment thread .github/workflows/release.yaml Outdated
The notify-homebrew gate required mainnet-from-tag.sh to pass, which
implements the obsolete even-minor-is-mainnet convention. Mainnet
upgrades have shipped with odd minors since v1.1.0, so stable releases
such as v2.1.0 were silently skipped and the tap stayed at v2.0.1.

Formulas must publish for every stable tag and never for prereleases,
matching the equivalent gate in the provider repo.

Compare the gate output with strict equality so script failures fail
closed; contains() would also match error output such as exit code 127.

Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
@chalabi2 chalabi2 force-pushed the ci/fix-homebrew-notify branch from 0d3dda4 to a3f9ccf Compare June 12, 2026 17:20
IS_STABLE required IS_MAINNET, which uses the obsolete
even-minor-is-mainnet convention, so images for odd-minor stable
releases such as v2.1.0 were published as :latest instead of :stable.
Derive IS_STABLE from the prerelease check alone.

Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
@chalabi2 chalabi2 force-pushed the ci/fix-homebrew-notify branch from a3f9ccf to 9e64460 Compare June 12, 2026 17:39
Comment thread script/genchangelog.sh Outdated
chalabi2 added 2 commits June 12, 2026 10:59
The tag-filter regexes restricted the changelog baseline to tags with
the same minor-version parity per the obsolete convention. Release
notes for v2.1.0 were therefore generated against v1.1.1 instead of
v2.0.1. Filter only by stable vs prerelease, deriving the patterns
from semver_funcs.sh instead of hardcoding them.

Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
The even-minor-is-mainnet convention is dead since v1.1.0; the release
workflow, Makefile, and genchangelog no longer consume this script.

Signed-off-by: Joseph Chalabi <chalabi.joseph@gmail.com>
@chalabi2 chalabi2 force-pushed the ci/fix-homebrew-notify branch from 9e64460 to 2a18256 Compare June 12, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants