Skip to content

Commit

Permalink
feat: add brew install for lula
Browse files Browse the repository at this point in the history
  • Loading branch information
CloudBeard committed Oct 3, 2024
1 parent df81cf7 commit 55b8b60
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,22 @@ jobs:
name: build-artifacts
path: bin/

- name: Get Brew tap repo token
id: brew-tap-token
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
with:
app-id: ${{ secrets.HOMEBREW_TAP_WORKFLOW_GITHUB_APP_ID }}
private-key: ${{ secrets.HOMEBREW_TAP_WORKFLOW_GITHUB_APP_SECRET }}
owner: defenseunicorns
repositories: homebrew-tap

# Create the GitHub release notes
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
distribution: goreleaser
version: latest
args: release --clean --verbose
args: release --clean --verbose --config .goreleaser.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ steps.brew-tap-token.outputs.token }}
35 changes: 35 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,41 @@ snapshot:
changelog:
use: github-native

brews:
- name: lula
repository:
owner: defenseunicorns
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
branch: "{{ .ProjectName }}-{{ .Tag }}"
pull_request:
enabled: true
base:
branch: main
owner: defenseunicorns
name: homebrew-tap
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
homepage: "https://github.com/defenseunicorns/lula"
description: "The Compliance Validator"

# NOTE: We are using .Version instead of .Tag because homebrew has weird semver parsing rules and won't be able to
# install versioned releases that has a `v` character before the version number.
- name: "lula@{{ .Version }}"
repository:
owner: defenseunicorns
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
branch: "{{ .ProjectName }}-{{ .Tag }}"
pull_request:
enabled: true
base:
branch: main
owner: defenseunicorns
name: homebrew-tap
commit_msg_template: "Brew formula update for {{ .ProjectName }} versioned release {{ .Tag }}"
homepage: "https://github.com/defenseunicorns/lula"
description: "The Compliance Validator"

# Generate a GitHub release and publish the release for the tag
release:
github:
Expand Down

0 comments on commit 55b8b60

Please sign in to comment.