From a9e1688600a2051a9437697376ebf39131040f5e Mon Sep 17 00:00:00 2001 From: Daniel Henkel Date: Tue, 5 Dec 2023 14:20:38 +0100 Subject: [PATCH] feature: goreleaser homebrew integration --- .github/workflows/main.yml | 15 +++++++++++++-- .goreleaser.yaml | 16 ++++++++++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fa302b7..a37b0ad 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,8 @@ on: push: branches: - main + tags: + - '*' jobs: style: @@ -53,8 +55,17 @@ jobs: uses: actions/setup-go@v3 with: go-version: 1.21 - - name: Run GoReleaser + - name: GoReleaser dry-run uses: goreleaser/goreleaser-action@v4.6.0 + if: ${{ !startsWith(github.ref, 'refs/tags/') }} with: version: latest - args: release --skip=publish --skip=validate --clean --snapshot + args: release --skip=publish --clean --snapshot + - name: GoReleaser publish + uses: goreleaser/goreleaser-action@v4.6.0 + if: ${{ startsWith(github.ref, 'refs/tags/') }} + with: + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GH_PAT }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 69f9939..031dd21 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -24,8 +24,8 @@ builds: - arm - arm64 goos: - - linux - - windows + # - linux + # - windows - darwin archives: @@ -42,6 +42,18 @@ archives: format_overrides: - goos: windows format: zip +brews: + - name: kubectl-pdb + folder: Formula + homepage: "https://github.com/dhenkel92/kubectl-pdb" + license: "MIT" + repository: + owner: dhenkel92 + name: homebrew-tap + branch: main + pull_request: + enabled: true + checksum: name_template: 'checksums.txt' snapshot: