Skip to content

Commit

Permalink
added separate homebrew tap token, skip homebrew publish till #84 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chandanpasunoori committed Jan 6, 2023
1 parent b98724e commit 625673f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
- name: Update krew-index
uses: rajatjindal/[email protected]
with:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@ jobs:
go-version-file: go.mod
cache: true
- run: go test -v ./...
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --rm-dist --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
15 changes: 9 additions & 6 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,32 @@ builds:
env:
- CGO_ENABLED=0
ldflags:
- -s -w
- -X github.com/boz/tail/version.Version={{.Tag}}
- -X github.com/boz/tail/version.Commit={{.ShortCommit}}
- -X github.com/boz/tail/version.Date={{.Date}}
- -s -w
- -X github.com/boz/tail/version.Version={{.Tag}}
- -X github.com/boz/tail/version.Commit={{.ShortCommit}}
- -X github.com/boz/tail/version.Date={{.Date}}
- -X github.com/boz/tail/version.BuiltBy=GoReleaser
- -X github.com/boz/tail/version.OsName={{.Os}}
- -X github.com/boz/tail/version.PlatformName={{.Arch}}
- -X main.version={{.Tag}}
- -X main.commit={{.ShortCommit}}

archives:
-
name_template: '{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
- name_template: '{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'

brews:
- tap:
owner: boz
name: homebrew-repo
branch: master
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
commit_author:
name: boz
email: [email protected]
goamd64: v2
homepage: "https://github.com/boz/kail"
description: "kubernetes tail - pod log viewer"
skip_upload: true

checksum:
name_template: "checksums.txt"
Expand Down

0 comments on commit 625673f

Please sign in to comment.