-
Notifications
You must be signed in to change notification settings - Fork 40
build: 👷 Add variants to release binaries #850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,18 +48,49 @@ jobs: | |
| fi | ||
| echo "Building version ${VERSION}" | ||
| mkdir -p dist | ||
| for bin in abctl authbridge-proxy; do | ||
| for target in linux/amd64 linux/arm64 darwin/amd64 darwin/arm64; do | ||
| os="${target%/*}" | ||
| arch="${target#*/}" | ||
| echo "==> ${bin} ${os}/${arch}" | ||
| ( cd "authbridge/cmd/${bin}" && \ | ||
| GOWORK=off CGO_ENABLED=0 GOOS="${os}" GOARCH="${arch}" \ | ||
| go build -trimpath \ | ||
| -ldflags "-s -w -X main.version=${VERSION}" \ | ||
| -o "${GITHUB_WORKSPACE}/dist/${bin}" . ) | ||
| tar -C dist -czf "dist/${bin}_${VERSION}_${os}_${arch}.tar.gz" "${bin}" | ||
| rm -f "dist/${bin}" | ||
|
|
||
| # authbridge-proxy variants: "<suffix>:<build-tags>". Empty | ||
| # suffix is the default plugin set. One variant per opt-in | ||
| # plugin (or one combined "full") — never enumerate combos. | ||
| lite_tags="exclude_plugin_a2aparser,exclude_plugin_ibac" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion — this is now the fourth code copy of the lite tag list, after The timing is what makes it worth raising: #761 adds A single definition the three workflows and the script all read — a |
||
| lite_tags="${lite_tags},exclude_plugin_inferenceparser" | ||
| lite_tags="${lite_tags},exclude_plugin_mcpparser,exclude_plugin_opa" | ||
| lite_tags="${lite_tags},exclude_plugin_sparc,exclude_plugin_tokenbroker" | ||
| declare -a proxy_variants=( | ||
| ":" | ||
| "lite:${lite_tags}" | ||
| "sessionbudget:include_plugin_sessionbudget" | ||
| ) | ||
|
|
||
| build_proxy() { | ||
| local variant="$1" tags="$2" os="$3" arch="$4" | ||
| local suffix=""; [ -n "${variant}" ] && suffix="-${variant}" | ||
| local archive="dist/authbridge-proxy${suffix}_${VERSION}_${os}_${arch}.tar.gz" | ||
| echo "==> authbridge-proxy${suffix} ${os}/${arch}" | ||
| ( cd authbridge/cmd/authbridge-proxy && \ | ||
| GOWORK=off CGO_ENABLED=0 GOOS="${os}" GOARCH="${arch}" \ | ||
| go build -trimpath \ | ||
| -tags "${tags}" \ | ||
| -ldflags "-s -w -X main.version=${VERSION}" \ | ||
| -o "${GITHUB_WORKSPACE}/dist/authbridge-proxy" . ) | ||
| tar -C dist -czf "${archive}" authbridge-proxy | ||
| rm -f dist/authbridge-proxy | ||
| } | ||
|
|
||
| for target in linux/amd64 linux/arm64 darwin/amd64 darwin/arm64; do | ||
| os="${target%/*}"; arch="${target#*/}" | ||
|
|
||
| echo "==> abctl ${os}/${arch}" | ||
| ( cd authbridge/cmd/abctl && \ | ||
| GOWORK=off CGO_ENABLED=0 GOOS="${os}" GOARCH="${arch}" \ | ||
| go build -trimpath \ | ||
| -ldflags "-s -w -X main.version=${VERSION}" \ | ||
| -o "${GITHUB_WORKSPACE}/dist/abctl" . ) | ||
| tar -C dist -czf "dist/abctl_${VERSION}_${os}_${arch}.tar.gz" abctl | ||
| rm -f dist/abctl | ||
|
|
||
| for entry in "${proxy_variants[@]}"; do | ||
| build_proxy "${entry%%:*}" "${entry#*:}" "${os}" "${arch}" | ||
| done | ||
| done | ||
| ( cd dist && sha256sum ./*.tar.gz > checksums.txt ) | ||
|
|
@@ -72,9 +103,21 @@ jobs: | |
| run: | | ||
| set -euo pipefail | ||
| TAG="${GITHUB_REF_NAME}" | ||
| notes="Prebuilt \`abctl\` and \`authbridge-proxy\` binaries for linux and macOS (amd64/arm64). | ||
|
|
||
| Verify downloads with \`sha256sum -c checksums.txt\`. On macOS, clear the Gatekeeper quarantine after extracting: \`xattr -dr com.apple.quarantine ./abctl\`." | ||
| # Build release notes one line at a time so no single string | ||
| # exceeds yamllint's 150-char cap. Single-quoted arguments keep | ||
| # backticks literal (no shell expansion). | ||
| notes="" | ||
| add() { notes="${notes}${1}"$'\n'; } | ||
| add 'Prebuilt `abctl` and `authbridge-proxy` binaries for linux and macOS (amd64/arm64).' | ||
| add '' | ||
| add '`authbridge-proxy` ships in variants matching the container images:' | ||
| add 'unqualified (default plugin set, matches the `authbridge` image),' | ||
| add '`-lite` (auth-only, matches `authbridge-lite`), plus one variant per' | ||
| add 'opt-in plugin currently offered for try-out (today: `-sessionbudget`).' | ||
| add 'Variants track opt-in plugins one-for-one; arbitrary combinations are not published.' | ||
| add '' | ||
| add 'Verify downloads with `sha256sum -c checksums.txt`. On macOS, clear the' | ||
| add 'Gatekeeper quarantine after extracting: `xattr -dr com.apple.quarantine ./abctl`.' | ||
| if gh release view "${TAG}" >/dev/null 2>&1; then | ||
| gh release upload "${TAG}" dist/*.tar.gz dist/checksums.txt --clobber | ||
| else | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: this
lite_tagslist is a hand-maintained duplicate of the 7-tagexclude_plugin_*set inbuild.yaml'sauthbridge-liteimage build. The two copies can silently drift — e.g. if an 8th exclude tag is added to the image build (there's an in-flight PR doing exactly that fortoolprune), this list would be left behind and the-litebinary would then include a plugin the-liteimage excludes. Consider sourcing both from one place (a shared tags file both workflows read, or a composite action) so parity can't rot. Non-blocking — a follow-up is fine.