Skip to content

Commit

Permalink
add configuration steps to create a brew release
Browse files Browse the repository at this point in the history
Signed-off-by: Nima Kaviani <[email protected]>
  • Loading branch information
nimakaviani committed Jun 2, 2024
1 parent 313c346 commit 4839874
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ jobs:
- name: build
run: |
OUT_FILE=/tmp/idpbuilder make build
- name: Generate a homebrew tap update token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.CNOE_HOMEBREW_APP_ID }}
private-key: ${{ secrets.CNOE_HOMEBREW_PRIVATE_KEY }}
- name: GoReleaser
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0
id: run-goreleaser
Expand All @@ -30,3 +36,4 @@ jobs:
args: release --clean --timeout 30m
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TOKEN: ${{ steps.generate-token.outputs.token }}
15 changes: 15 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,21 @@ builds:
ignore:
- goos: linux
goarch: '386'
brews:
- name: idpbuilder
homepage: "https://cnoe.io"
repository:
owner: nimakaviani
name: homebrew-cnoe
token: "{{ .Env.HOMEBREW_TOKEN }}"
commit_author:
name: "GoReleaser"
email: "[email protected]"
directory: formula
install: |
bin.install "idpbuilder"
test: |
system "#{bin}/idpbuilder --version"
archives:
- format: tar.gz
name_template: >-
Expand Down

0 comments on commit 4839874

Please sign in to comment.