diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6de855c..3c79ac5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,4 +21,7 @@ jobs: version: latest args: release --rm-dist env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # To upload homebrew formula to other repos, + # need to set the dedicated token having enough permissions + # https://github.com/goreleaser/goreleaser/issues/982 + GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index eca6dbd..80194a0 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -26,3 +26,15 @@ archives: format: zip release: prerelease: auto + +# https://goreleaser.com/customization/#Homebrew +brews: +- github: + owner: b4b4r07 + name: homebrew-tap + folder: Formula + homepage: https://github.com/b4b4r07/stein + description: A linter for config files with a customizable rule set + skip_upload: auto + test: | + system "#{bin}/stein", "--version"