From 3f56a4aefe6a984b781e2e5792b929ea6b6962e3 Mon Sep 17 00:00:00 2001 From: Johan Lindell Date: Fri, 19 Feb 2021 07:54:09 +0100 Subject: [PATCH] chore: added brew install (#73) * chore: added brew install and changes from binary release to tarballs * fix: added github token with correct priviledges to release --- .github/workflows/release.yaml | 2 +- .goreleaser.yml | 15 ++++++++++++++- install.sh | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1d825278..816a8d82 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -33,5 +33,5 @@ jobs: version: latest args: release --rm-dist env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GENERAL_GITHUB_SECRET }} # The tokens needs access to another repo, so the secret.GITHUB_SECRET won't suffice if: ${{ steps.release.outputs.release_created }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 0cf0767e..20ea7d30 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -25,7 +25,6 @@ archives: amd64: x86_64 arm: ARM arm64: ARM64 - format: binary checksum: name_template: "checksums.txt" snapshot: @@ -36,3 +35,17 @@ changelog: exclude: - "^docs:" - "^test:" +brews: + - name: multi-gitter + tap: + owner: lindell + name: homebrew-multi-gitter + download_strategy: CurlDownloadStrategy. + goarm: 6 + commit_author: + name: Johan Lindell + email: johan@lindell.me + description: "Update multiple repositories in bulk." + license: "MIT" + test: | + system "#{bin}/program version" diff --git a/install.sh b/install.sh index e7055767..6d759eed 100644 --- a/install.sh +++ b/install.sh @@ -48,6 +48,7 @@ execute() { http_download "${tmpdir}/${CHECKSUM}" "${CHECKSUM_URL}" hash_sha256_verify "${tmpdir}/${FILENAME}" "${tmpdir}/${CHECKSUM}" srcdir="${tmpdir}" + (cd "${tmpdir}" && untar "${TARBALL}") test ! -d "${BINDIR}" && install -d "${BINDIR}" for binexe in $BINARIES; do if [ "$OS" = "windows" ]; then