From 498630631be57c0a0e0e563baa4f556a6a5580e4 Mon Sep 17 00:00:00 2001 From: Neel Yadav Date: Wed, 2 Feb 2022 02:39:47 -0600 Subject: [PATCH] Add workflow to automate brew release --- .github/workflows/brew-update.yml | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/brew-update.yml diff --git a/.github/workflows/brew-update.yml b/.github/workflows/brew-update.yml new file mode 100644 index 000000000..ddfe5977c --- /dev/null +++ b/.github/workflows/brew-update.yml @@ -0,0 +1,43 @@ +# This workflow checks to see if the `kyokan-bob` package in +# Homebrew is updated to the latest release version. If it +# is not, then it will automatically open a PR to update it +# with the proper details in the Homebrew/homebrew-cask repo. + +# Triggers on its own every time there's a new release, and +# no human input should thus be required to maintain it. +# Can also be run as a manual Action if necessary. + +# If forking Homebrew/homebrew-cask is required to open the +# PR, a forked repo will get placed under the 'kyokan' org +# and get merged to Homebrew from there. + +# A personal access token of an org member with write access, +# stored as repository secret named BARREL_ROLL, is required. +# The only scope needed for that token is `public_repo`. +# PR's generated by this workflow will be made by that user. + +name: Homebrew Package Update + +on: + release: { types: released } + workflow_dispatch: + +jobs: + kyokan-bob: + runs-on: macos-latest + steps: + - name: bump-cask-pr kyokan-bob + uses: macauley/action-homebrew-bump-cask@v1.0.0 + with: + # Required, custom GitHub access token with only the 'public_repo' scope enabled + token: ${{secrets.BARREL_ROLL}} + # Optional, will create tap repo fork in organization + org: kyokan + # Bump all outdated casks in this tap (if 'cask' is empty) + tap: homebrew/cask + # Bump only these casks if outdated + cask: kyokan-bob + # Optional, if don't want to check for already open PRs + force: false # true + # Need to set this input if want to use `brew livecheck` + livecheck: true