Skip to content

feat(ENG-13436): publish standalone binaries via the Homebrew tap#322

Open
BartoszBlizniak wants to merge 7 commits into
masterfrom
eng-13436-publish-standalone-binaries-via-the-homebrew-tap
Open

feat(ENG-13436): publish standalone binaries via the Homebrew tap#322
BartoszBlizniak wants to merge 7 commits into
masterfrom
eng-13436-publish-standalone-binaries-via-the-homebrew-tap

Conversation

@BartoszBlizniak

Copy link
Copy Markdown
Member

Description

Publishes the standalone CLI binaries through the existing Homebrew tap. The release pipeline gains a publish-homebrew job that renders a per-architecture binary formula (macOS arm64/x86_64, Linux gnu x86_64/aarch64) from the release artifacts' checksums, verifies each live download URL against those checksums, and opens a pull request into the tap on a release/cloudsmith-cli-vX.Y.Z branch. The tap's main branch requires reviewed PRs with signed commits, so the flow is PR-based by design and tap PRs must be squash-merged. The PR also adds an Aliases/cloudsmith entry so brew install cloudsmith-io/cloudsmith-cli/cloudsmith works alongside the full formula name.

The existing tap formula installs the Python zipapp and depends on python@3.10; since this release retires the zipapp, the first binary release replaces that formula in place and existing users transition transparently via brew upgrade cloudsmith-cli (with an orphaned python@3.10 they can brew autoremove).

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring
  • Other (please describe)

Testing

  • Rendered formula passes brew style and brew audit --strict with zero findings; ruby -c clean; leftover-placeholder check built into the job.
  • Full end-to-end validation against a pre-release test repository: brew install, cloudsmith --version, brew test, and brew livecheck all green on macOS arm64, including the PyInstaller onedir libexec install pattern.
  • zizmor reports no findings for the workflow change; job re-runs are idempotent (force-push to the release branch, existing-PR guard, clean-tree early exit after the tap PR merges).

Additional Notes

  • The job is failure-isolated: nothing else in the release depends on it, and without the TAP_PUSH_TOKEN secret it stages the rendered formula as a workflow artifact instead of touching the tap. The token should be a fine-grained PAT scoped to the tap repository only (Contents and Pull requests read/write).
  • Checksum provenance: formula hashes come from the same artifacts the release publishes, and the job re-downloads each live URL and compares before opening the tap PR.
  • macOS codesigning/notarization is intentionally out of scope; the signing step slots into the binary build jobs later without any formula or tap changes.

🤖 Generated with Claude Code

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds automated publication of standalone (PyInstaller) Cloudsmith CLI binaries to the existing Homebrew tap by rendering a per-architecture formula from release artifacts, verifying live downloads against checksums, and opening a PR to the tap repo.

Changes:

  • Added a Homebrew formula template for installing the standalone binary across macOS (arm64/x86_64) and Linux (x86_64/aarch64 glibc).
  • Extended the release workflow with a publish-homebrew job to render, validate, checksum-verify, and optionally PR the updated formula into the Homebrew tap.
  • Added creation/updating of a Homebrew Aliases/cloudsmith symlink so brew install .../cloudsmith works.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packaging/homebrew/cloudsmith-cli.rb.tmpl New Homebrew formula template for installing the standalone CLI binary with per-OS/CPU URLs and a livecheck stanza.
.github/workflows/release.yml Adds a publish-homebrew job to render/upload the formula, verify published downloads, and optionally open a PR in the tap repo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packaging/homebrew/cloudsmith-cli.rb.tmpl Outdated
Comment thread packaging/homebrew/cloudsmith-cli.rb.tmpl Outdated
@BartoszBlizniak
BartoszBlizniak force-pushed the eng-12827-publish-standalone-binaries-via-the-release-docker-pipelines branch from 4f2fdab to 81c8125 Compare July 16, 2026 12:15
@BartoszBlizniak
BartoszBlizniak force-pushed the eng-13436-publish-standalone-binaries-via-the-homebrew-tap branch 2 times, most recently from 928f719 to 06cfbac Compare July 16, 2026 15:43
BartoszBlizniak and others added 3 commits July 16, 2026 17:17
…NG-12827)

Wire the standalone PyInstaller binaries (ENG-12826) into the release and Docker
pipelines, dogfooding the freshly-built cloudsmith binary to authenticate
(GitHub OIDC) and publish:

- Publish per-platform archives + SHA256 to Cloudsmith and build/push the
  container image, using the built binary + OIDC and the Docker credential
  helper instead of cloudsmith-cli-action / static-key docker login.
- GPG-sign the Linux archives (detached .sig sibling files).
- Idempotent, immutable-repo-safe publishing (skip already-published artifacts/tags).
- Tag raw uploads (os/arch/libc/target/type) for queryable CI selection.
- Dockerfile: multi-stage Alpine, musl binary, non-root, OCI labels; Docker Hub floating tags.
- CI hardening + perf: single-source target list, composite bootstrap action,
  GH_REPO for gh, trimmed clean-room docker runs, pinned runners.
- Redact PII from online smoketest logs (SMOKETEST_DEBUG for detail).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- setup-cloudsmith-binary: verify the .sha256 checksum before extracting
  the archive onto PATH, so a corrupted/unexpected artifact is never
  executed (the .sha256 is already downloaded alongside the archive).
- release.yml: document at the binaries call site that publishing is
  OIDC-only and the API key secret is required solely for the read-only
  online smoketest (fail-fast when online_smoketest is requested); the
  OIDC online path is covered by the binaries `oidc` job.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@BartoszBlizniak
BartoszBlizniak force-pushed the eng-12827-publish-standalone-binaries-via-the-release-docker-pipelines branch from 81c8125 to 0ee57a6 Compare July 16, 2026 16:18
@BartoszBlizniak
BartoszBlizniak force-pushed the eng-13436-publish-standalone-binaries-via-the-homebrew-tap branch from 06cfbac to e5bf403 Compare July 16, 2026 16:19
Export cloudsmith-cli-release-key.asc during sign-linux, stage it as a
release asset, assert its presence before publishing, and point the
README verification docs at it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@BartoszBlizniak
BartoszBlizniak force-pushed the eng-13436-publish-standalone-binaries-via-the-homebrew-tap branch from e5bf403 to 35c3191 Compare July 16, 2026 16:49
@BartoszBlizniak
BartoszBlizniak marked this pull request as ready for review July 17, 2026 09:31
@BartoszBlizniak
BartoszBlizniak requested a review from a team as a code owner July 17, 2026 09:31
Comment thread .github/workflows/release.yml Outdated
Add packaging/homebrew/cloudsmith-cli.rb.tmpl, a standalone-binary
formula for the existing cloudsmith-io/homebrew-cloudsmith-cli tap
(macOS arm64/x86_64 + Linux gnu x86_64/aarch64, livecheck against the
latest install manifest), replacing the tap's current cloudsmith.pyz
formula, which breaks once the pyz asset stops shipping.

Add a publish-homebrew release job that renders the template with the
release version and per-target SHA256s, verifies the live Cloudsmith
raw downloads match those checksums, syntax-checks the result, and
pushes it to <owner>/homebrew-cloudsmith-cli. Without TAP_PUSH_TOKEN
the rendered formula is only staged as a workflow artifact.

Verified locally end to end against the v1.19.4 test release: rendered
formula passes brew audit --strict, brew install, brew test, and brew
livecheck on macOS arm64.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@BartoszBlizniak
BartoszBlizniak force-pushed the eng-13436-publish-standalone-binaries-via-the-homebrew-tap branch from 35c3191 to 8038942 Compare July 17, 2026 10:08
Base automatically changed from eng-12827-publish-standalone-binaries-via-the-release-docker-pipelines to master July 17, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants