From 12878d12260d4aecb9dd4b50c53907b7ec8fb424 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Feb 2026 18:59:04 +0000 Subject: [PATCH 1/3] Initial plan From d572af934eefe01d7cae4154d56ade2ef1489729 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Feb 2026 19:01:44 +0000 Subject: [PATCH 2/3] Add homebrew bottle configuration to GoReleaser Co-authored-by: lionello <591860+lionello@users.noreply.github.com> --- .github/workflows/go.yml | 17 ++++++++++------- src/.goreleaser.yml | 22 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index af4f2adca..920b91fce 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -373,6 +373,7 @@ jobs: env: GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} GH_PAT_WINGET: ${{ secrets.GH_PAT_WINGET }} + HOMEBREW_ACTION_TRIGGER_TOKEN: ${{ secrets.HOMEBREW_ACTION_TRIGGER_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GITHUB_TOKEN is limited to the current repository DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }} DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_WEBHOOK_TOKEN }} @@ -415,13 +416,15 @@ jobs: event-type: cli-autodoc client-payload: '{"version": "${{ github.ref_name }}"}' - - name: Trigger Homebrew Formula Update - uses: peter-evans/repository-dispatch@v3 - with: - token: ${{ secrets.HOMEBREW_ACTION_TRIGGER_TOKEN }} - repository: DefangLabs/homebrew-defang - event-type: update-homebrew-formula - client-payload: '{"version": "${{ github.ref_name }}"}' + # NOTE: Homebrew formula updates are now handled automatically by GoReleaser with bottles + # The manual trigger below is kept for backwards compatibility but may be removed in the future + # - name: Trigger Homebrew Formula Update + # uses: peter-evans/repository-dispatch@v3 + # with: + # token: ${{ secrets.HOMEBREW_ACTION_TRIGGER_TOKEN }} + # repository: DefangLabs/homebrew-defang + # event-type: update-homebrew-formula + # client-payload: '{"version": "${{ github.ref_name }}"}' - name: Checkout tag uses: actions/checkout@v4 diff --git a/src/.goreleaser.yml b/src/.goreleaser.yml index b715a3354..4461cb60f 100644 --- a/src/.goreleaser.yml +++ b/src/.goreleaser.yml @@ -110,6 +110,28 @@ release: # --zsh <($out/bin/defang completion zsh) \ # --fish <($out/bin/defang completion fish) +brews: + - repository: + owner: DefangLabs + name: homebrew-defang + token: "{{ .Env.HOMEBREW_ACTION_TRIGGER_TOKEN }}" + name: defang + homepage: https://defang.io + description: Command-line interface for the Defang Opinionated Platform + license: MIT + commit_author: + name: defang-bot + email: bot@defang.io + install: | + bin.install "defang" + + # Generate and install shell completions + bash_completion.install Utils.safe_popen_read(bin/"defang", "completion", "bash") => "defang" + zsh_completion.install Utils.safe_popen_read(bin/"defang", "completion", "zsh") => "_defang" + fish_completion.install Utils.safe_popen_read(bin/"defang", "completion", "fish") + test: | + system "#{bin}/defang", "--version" + changelog: use: github-native filters: From dec6554da16e98d92f41fc93e9244d12ee489ccd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Feb 2026 19:02:53 +0000 Subject: [PATCH 3/3] Fix fish completion filename and clarify comment about manual trigger Co-authored-by: lionello <591860+lionello@users.noreply.github.com> --- .github/workflows/go.yml | 5 +++-- src/.goreleaser.yml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 920b91fce..3f169b364 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -416,8 +416,9 @@ jobs: event-type: cli-autodoc client-payload: '{"version": "${{ github.ref_name }}"}' - # NOTE: Homebrew formula updates are now handled automatically by GoReleaser with bottles - # The manual trigger below is kept for backwards compatibility but may be removed in the future + # NOTE: Homebrew formula updates are now handled automatically by GoReleaser with bottles. + # The manual trigger below is preserved as documentation of the old approach but is no longer needed. + # It can be safely removed in a future cleanup. # - name: Trigger Homebrew Formula Update # uses: peter-evans/repository-dispatch@v3 # with: diff --git a/src/.goreleaser.yml b/src/.goreleaser.yml index 4461cb60f..eb9cc1985 100644 --- a/src/.goreleaser.yml +++ b/src/.goreleaser.yml @@ -128,7 +128,7 @@ brews: # Generate and install shell completions bash_completion.install Utils.safe_popen_read(bin/"defang", "completion", "bash") => "defang" zsh_completion.install Utils.safe_popen_read(bin/"defang", "completion", "zsh") => "_defang" - fish_completion.install Utils.safe_popen_read(bin/"defang", "completion", "fish") + fish_completion.install Utils.safe_popen_read(bin/"defang", "completion", "fish") => "defang.fish" test: | system "#{bin}/defang", "--version"