Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add configuration steps to create a brew release #271

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want the repository for this to be nimakaviani/homebrew-cnoe or is this for testing? I would imagine maybe we'd want to consider cnoe-io/tap as the repository. It does seem that other big projects like argocd follow the pattern of project/tap for example argo uses argoproj/tap based on documentation here https://docs.brew.sh/Taps#the-brew-tap-command

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, an oversight with the owner name. fixed, thanks!

agreed. tap is a better name. renamed the repo to publish to tap.

owner: cnoe-io
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TOKEN }}"
commit_author:
nimakaviani marked this conversation as resolved.
Show resolved Hide resolved
name: "CNOEAutomation"
email: "[email protected]"
directory: formula
install: |
bin.install "idpbuilder"
test: |
system "#{bin}/idpbuilder --version"
archives:
- format: tar.gz
name_template: >-
Expand Down
Loading