Skip to content

ci(release): goreleaser auto-publishes to brew tap + scoop bucket#2

Open
frahlg wants to merge 1 commit into
mainfrom
ci/auto-tap-bucket
Open

ci(release): goreleaser auto-publishes to brew tap + scoop bucket#2
frahlg wants to merge 1 commit into
mainfrom
ci/auto-tap-bucket

Conversation

@frahlg
Copy link
Copy Markdown
Member

@frahlg frahlg commented May 12, 2026

Summary

Removes the manual bump-PR step that was needed for v0.2.0 (homebrew-tap#1 + scoop-bucket#1). On the next tag push, goreleaser:

  • uploads binaries to GitHub Releases (unchanged)
  • opens a commit on srcfl/homebrew-tap that bumps Formula/hugin-agent.rb
  • opens a commit on srcfl/scoop-bucket that bumps hugin-agent.json

⚠ Required setup before merging

Create a repo secret named HOMEBREW_TAP_GITHUB_TOKEN on srcfl/hugin-agent:

  • Type: fine-grained Personal Access Token (or GitHub App installation token)
  • Scope: contents: write on srcfl/homebrew-tap AND srcfl/scoop-bucket
  • Expiry: as long as you're comfortable with (1 year is standard)

Without this secret, the next release will fail at the brew/scoop publish step. The binaries themselves will still upload — GitHub Releases keeps working — but the tap and bucket won't auto-update.

Test plan

After merge:

  1. Add the secret as above.
  2. Make a tiny no-op change, tag v0.2.1, push.
  3. Watch the release workflow: artifacts upload, then goreleaser pushes commits to homebrew-tap + scoop-bucket.
  4. brew upgrade hugin-agent picks up v0.2.1 within a few minutes.

If something breaks, the old v0.2.0 release remains installable.

Stops the manual bump-PR-after-every-release tax. On tag push,
goreleaser:

- uploads binaries to GitHub Releases (unchanged)
- opens a commit on srcfl/homebrew-tap that bumps Formula/hugin-agent.rb
- opens a commit on srcfl/scoop-bucket that bumps hugin-agent.json

Auth: a new HOMEBREW_TAP_GITHUB_TOKEN repo secret holds a PAT with
contents:write on both tap + bucket. Single token covers both because
they're in the same org.

The next release after this lands (v0.2.1) will be a live test of
the auto-publish path. If anything's off, fix forward — old releases
remain installable.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
frahlg added a commit that referenced this pull request May 13, 2026
Unblocks bundling hugin-agent as a sidecar in other Docker-native
products (forty-two-watts being the immediate consumer).

What lands:

Dockerfile (repo root)
  Multi-stage build (golang:1.25-alpine → alpine:3.21). Runs as
  non-root `hugin` user. Container-friendly defaults:
    HUGIN_AGENT_HOST=0.0.0.0      (reachable from outside the container)
    HUGIN_AGENT_PORT=19090
    HUGIN_AGENT_CREDS=/var/lib/hugin-agent/creds.json
  CMD --no-browser because there's no browser to open inside the
  container. The pairing URL is printed to stderr; the parent
  product's UI or `docker logs` surfaces it. /var/lib/hugin-agent
  is a named volume so creds.json survives container restarts.

.goreleaser.yml
  dockers: + docker_manifests: blocks for linux/amd64 + linux/arm64.
  arm64 explicitly for Raspberry Pi installs (a big 42W use case).
  Three tag aliases per release: vX.Y.Z, vX.Y, latest.

.github/workflows/release.yml
  Adds packages: write permission and three pre-goreleaser steps:
  QEMU setup, buildx setup, GHCR login (using GITHUB_TOKEN — no
  extra secret needed for same-org GHCR publish).

README.md
  New Docker section between Scoop and "From source", with a
  docker-compose snippet showing the sidecar pattern.

The brew tap + scoop bucket auto-publish PR (#2) is independent;
both can land in either order. Same release tag drives all three
publishers (tarballs, image, brew/scoop) when both PRs are merged.

Co-authored-by: Fredrik <fredde@Fredrikemacmini.localdomain>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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