Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -415,13 +416,16 @@ 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 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:
# 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
Expand Down
22 changes: 22 additions & 0 deletions src/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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") => "defang.fish"
test: |
system "#{bin}/defang", "--version"

changelog:
use: github-native
filters:
Expand Down