From 48429b6b438929a2027eb4a6bb1f4eec3984339b Mon Sep 17 00:00:00 2001 From: guoxudong Date: Tue, 17 Nov 2020 15:25:37 +0800 Subject: [PATCH] update goreleaser --- .github/workflows/homebrew.yaml | 24 ------------------------ .goreleaser.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 24 deletions(-) delete mode 100644 .github/workflows/homebrew.yaml diff --git a/.github/workflows/homebrew.yaml b/.github/workflows/homebrew.yaml deleted file mode 100644 index 9a2f945e..00000000 --- a/.github/workflows/homebrew.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: Homebrew - -on: - workflow_run: - workflows: [ "Release" ] - types: - - completed - -jobs: - homebrew: - name: Bump Homebrew formula - runs-on: ubuntu-latest - steps: - - uses: mislav/bump-homebrew-formula-action@v1 - with: - formula-name: kubecm - homebrew-tap: sunny0826/homebrew-tap - base-branch: master - download-url: https://github.com/sunny0826/kubecm/releases/download/v${{version}}/kubecm_${{version}}_Darwin_x86_64.tar.gz - commit-message: ${{version}} - env: - COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - diff --git a/.goreleaser.yml b/.goreleaser.yml index 0db97df4..cdc4a311 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -27,4 +27,33 @@ release: owner: sunny0826 name: kubecm name_template: '{{.ProjectName}}-v{{.Version}}' +brews: + - name: kubecm + tap: + owner: sunny0826 + name: homebrew-tap + token: "{{ .Env.HOMEBREW_TOKEN }}" + url_template: "https://github.com/sunny0826/kubecm/releases/{{ .Tag }}/{{ .ArtifactName }}" + # Git author used to commit to the repository. + # Defaults are shown. + commit_author: + name: goreleaserbot + email: goreleaser@carlosbecker.com + homepage: "https://github.com/sunny0826/kubecm" + description: "Merge multiple kubeconfig" + + # Packages your package depends on. + dependencies: + - name: git + - name: go + + # So you can `brew test` your formula. + # Default is empty. + test: | + system "#{bin}/kubecm version" + + # Custom install script for brew. + # Default is 'bin.install "program"'. + install: | + bin.install "kubecm"