Skip to content

Commit

Permalink
add configuration steps to create a brew release (#271)
Browse files Browse the repository at this point in the history
Signed-off-by: Nima Kaviani <nkaviani@amazon.com>
Co-authored-by: Charles Moulliard <cmoulliard@redhat.com>
nimakaviani and cmoulliard authored Jan 22, 2025
1 parent 6c0467e commit b8996ee
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
@@ -30,6 +30,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
@@ -38,4 +44,5 @@ jobs:
args: release --clean --timeout 30m
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TOKEN: ${{ steps.generate-token.outputs.token }}
GORELEASER_CURRENT_TAG: ${{ github.ref_name }}
15 changes: 15 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -26,6 +26,21 @@ builds:
ignore:
- goos: linux
goarch: '386'
brews:
- name: idpbuilder
homepage: "https://cnoe.io"
repository:
owner: cnoe-io
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TOKEN }}"
commit_author:
name: "CNOEAutomation"
email: "noreply@cnoe.io"
directory: formula
install: |
bin.install "idpbuilder"
test: |
system "#{bin}/idpbuilder --version"
archives:
- format: tar.gz
name_template: >-

0 comments on commit b8996ee

Please sign in to comment.