Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow for Homebrew release automation #459

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nlydv
Copy link
Contributor

@nlydv nlydv commented Feb 2, 2022

As mentioned in #311 about automatically updating the Homebrew package on new release, this PR adds a workflow to do that. Just going to copy/paste the comment headers I wrote in the file:

# 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.

I also tested this properly by simulating the pipeline using my personal, non-official homebrew tap at nlydv/homebrew-brew containing a bobby.rb brew package, which sources from my fork at nlydv/bob-wallet, from which I published a dummy release of v0.999.2... which, after some more mundane steps... resulted in an automated PR that updates the bobby.rb file in nlydv/homebrew-brew as intended.

A screenshot of the workflow log:
brew-update.yml log preview
(Notice, the resulting .dmg hash remained intact through the whole process and is equiv. to the hash of the official v0.9.0 release's .dmg file.)

@nlydv
Copy link
Contributor Author

nlydv commented Aug 16, 2022

Changes in homebrew file to bump & support multi-arch dists got merged

Doesn’t effect this workflow though, it will update both Mac release assets in homebrew whenever a new public version gets released.

Rebased just to keep this PR fresh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant