From fb51e908cbb2a43eefdd73b5dedad023f3c0c024 Mon Sep 17 00:00:00 2001 From: Cody Lee Date: Thu, 22 Dec 2022 20:00:26 -0600 Subject: [PATCH 1/2] add homebrew auto generation to golift/homebrew-mugs --- .goreleaser.yaml | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 2db09142..47e70c99 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -407,6 +407,58 @@ universal_binaries: ids: - unpoller-mac +brews: + - name: unpoller + ids: + - unpoller + - unpoller-linux-arm + - unpoller-mac + tap: + owner: golift + name: homebrew-mugs + branch: master + token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" + commit_author: + name: goreleaserbot + email: bot@goreleaser.com + commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}" + folder: Formula + # enable the line below only for testing locally + # skip_upload: true + homepage: https://unpoller.com/ + description: "Polls a UniFi controller, exports metrics to InfluxDB, Prometheus and Datadog" + caveats: "Edit the config file at #{etc}/unpoller/up.conf then start unpoller with brew services start unpoller ~ log file: #{var}/log/unpoller.log The manual explains the config file options: man unpoller" + conflicts: + - unifi-poller + license: MIT + plist: | + + + + + Label + #{plist_name} + ProgramArguments + + #{bin}/unpoller + --config + #{etc}/unpoller/up.conf + + RunAtLoad + + KeepAlive + + StandardErrorPath + #{var}/log/unpoller.log + StandardOutPath + #{var}/log/unpoller.log + + + url_template: "https://github.com/unpoller/unpoller/releases/download/{{ .Tag }}/{{ .ArtifactName }}" + test: | + assert_match "unpoller v#{version}", shell_output("#{bin}/unpoller -v 2>&1", 2) + + publishers: - name: "packagecloud-publisher" ids: From 592a52f308c23a71e85ab793312a340db20e8be8 Mon Sep 17 00:00:00 2001 From: Cody Lee Date: Thu, 22 Dec 2022 20:04:16 -0600 Subject: [PATCH 2/2] add to env for goreleaser --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf97136d..20f64f35 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -69,6 +69,7 @@ jobs: GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} DOCKER_REGISTRY: ${{ env.DOCKER_REGISTRY }} DOCKER_IMAGE_NAME: ${{ env.DOCKER_IMAGE_NAME }} + HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} PACKAGECLOUD_SIGNING_GPG: /tmp/key.gpg PACKAGECLOUD_SIGNING_KEY_ID: ${{ steps.import_gpg.outputs.keyid }}