8000 ci(release): publish binaries and the Homebrew formula on tags by lexfrei · Pull Request #327 · aenix-io/aeman · GitHub
[go: up one dir, main page]

Skip to content

ci(release): publish binaries and the Homebrew formula on tags - #327

Merged
kvaps merged 2 commits into
mainfrom
ci/goreleaser
Nov 23, 2026
Merged

kvaps merged 2 commits into
mainfrom
ci/goreleaser

Conversation

@lexfrei
@lexfrei lexfrei commented Nov 16, 2026 •
Copy link
Copy Markdown
Contributor

A v* tag now publishes prebuilt binaries and the Homebrew formula. A tokenless job builds the SPA; GoReleaser then cross-compiles aeman for darwin and linux on amd64 and arm64, creates the GitHub release with the archives and checksums.txt, and commits Formula/aeman.rb straight to main of aenix-io/homebrew-tap. brew install aenix-io/tap/aeman then installs a binary instead of building with Go and Node, and brew upgrade picks up every release without a manual bump.

The formula keeps the brews section although GoReleaser deprecates it: only a formula has the service block that runs aeman mcp under brew services. The service waits 5 seconds between restarts, because systemd's default 100ms delay trips its start limit and leaves the unit failed. Board settings come from Homebrew's per-service file ~/.homebrew/services/aeman.env ($XDG_CONFIG_HOME/homebrew/services/aeman.env when that is set), so the formula ships no config file or wrapper script. Pre-release tags do not touch the tap. The version string keeps its leading v, as in the image and make backend.

npm runs only in that first job, so dependency code never shares a runner with a write token. The tap token is minted from the GitHub App with actions/create-github-app-token, limited to aenix-io/homebrew-tap with contents: write. It is minted before anything is published, so a broken App setup fails the run without leaving a release that has no formula. Dependency caches are off in this workflow, and image.yml is unchanged. Every tag now gets a GitHub release with a changelog generated from the conventional commit subjects; until now releases were written by hand, and most tags have none.

Part of #276: Windows binaries, cosign signatures and the .deb are not in this change.

Merge order: aenix-io/homebrew-tap#1 first, then this PR. That way the first release overwrites the hand-written formula on the tap's main instead of conflicting with an open PR.

Tested locally: after make frontend, goreleaser release --snapshot --clean --skip=publish builds all four targets, and without web/dist it stops at the hook. I installed the generated formula from a local tap against the snapshot archive; brew test, brew style and brew audit --strict pass, and the rendered launchd and systemd units pick up variables from the env file. actionlint and zizmor report nothing on release.yml.

Release tags produce only the container image, so running aeman
outside a container means building it with Go and Node. GoReleaser
cross-compiles binaries for darwin and linux on amd64 and arm64 around
an already built SPA, and writes a Homebrew formula with a service
block into aenix-io/homebrew-tap. It does not run npm itself: that
executes dependency code, which must not share an environment with
the release tokens, so a hook only checks that web/dist is there.

The formula keeps `brews` although GoReleaser deprecates it: only a
formula has the service block that brew services runs. Pre-release
tags skip the tap, since for Homebrew the tap is always the latest
release. The version keeps its leading v, matching the image and
make backend.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Runs GoReleaser on every v* tag next to the existing image workflow.
The SPA is built in a separate job with a read-only token and handed
over as an artifact, so npm packages never run on a runner that holds
a write token. The tap token is minted from the GitHub App installed
on aenix-io/homebrew-tap, scoped to that repository and contents:
write, and minted before anything is published, so a broken App setup
fails the run without leaving a release behind with no formula.

Dependency caches are off: a release build must not consume a cache
that a pull request run could have written.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
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.

2 participants

0