Skip to content

Commit

Permalink
Try homebrew-releaser action.
Browse files Browse the repository at this point in the history
  • Loading branch information
reynoldsalec committed Oct 10, 2022
1 parent 17e2e9c commit ca3cbbc
Showing 1 changed file with 70 additions and 10 deletions.
80 changes: 70 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,74 @@ jobs:
id: shasum-mac-os
run: |
echo ::set-output name=sha::"$(shasum -a 256 releases/${{ matrix.compressed }} | awk '{printf $1}')"
- name: Update Homebrew formula
uses: naijabx/update-formula-homebrew-action@v1
homebrew-releaser:
runs-on: ubuntu-latest
name: homebrew-releaser
steps:
- name: Release my project to my Homebrew tap
uses: reynoldsalec/homebrew-releaser@9-custom-tar-url
with:
repo: lando/hyperdrive
tap: lando/homebrew-lando
formula: Formula/hyperdrive.rb
download-url: https://github.com/lando/hyperdrive/releases/download/${{ github.ref_name }}/${{ matrix.compressed }}
sha256: ${{ steps.shasum_mac_os.outputs.sha }}
commit-message: Update Hyperdrive Formula to ${{ github.ref_name }}
env:
COMMIT_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
# The name of the homebrew tap to publish your formula to as it appears on GitHub.
# Required.
homebrew_owner: lando
homebrew_tap: homebrew-lando

# The name of the folder in your homebrew tap where formula will be committed to.
# Default is shown.
formula_folder: Formula

# The GitHub Token (saved as a repo secret) that has `repo` permissions for the homebrew tap you want to release to.
# Required.
github_token: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}

# Git author info used to commit to the homebrew tap.
# Defaults are shown.
commit_owner: Lando Droid
commit_email: [email protected]

# Custom install command for your formula.
# Required.
install: 'bin.install "hyperdrive-macos-#{arch}-v#{version}" => "hyperdrive"'

# Custom test command for your formula so you can run `brew test`.
# Optional.
test: 'system "#{bin}/hyperdrive" "--version"'

# Adds URL and checksum targets for different OS and architecture pairs. This assumes
# a tar archive exists on your GitHub repo with the following URL pattern:
# https://github.com/{GITHUB_OWNER}/{REPO_NAME}/releases/download/{TAG}/{REPO_NAME}-{VERSION}-{OPERATING_SYSTEM}-{ARCHITECTURE}.tar.gz'
# Darwin AMD: https://github.com/justintime50/myrepo/releases/download/v1.2.0/myrepo-1.2.0-darwin-amd64.tar.gz
# Linux ARM: https://github.com/justintime50/myrepo/releases/download/v1.2.0/myrepo-1.2.0-linux-arm64.tar.gz
# Optional.
target_darwin_amd64: https://github.com/lando/hyperdrive/releases/download/${{ github.ref_name }}/hyperdrive-macos-amd64-${{ github.ref_name }}.tar.gz
target_darwin_arm64: https://github.com/lando/hyperdrive/releases/download/${{ github.ref_name }}/hyperdrive-macos-arm64-${{ github.ref_name }}.tar.gz
target_linux_amd64: false
target_linux_arm64: false

# Update your homebrew tap's README with a table of all projects in the tap.
# This is done by pulling the information from all your formula.rb files - eg:
#
# | Project | Description | Install |
# | ------------------------------------------ | ------------ | ------------------------ |
# | [formula_1](https://github.com/user/repo1) | helpful text | `brew install formula_1` |
# | [formula_1](https://github.com/user/repo2) | helpful text | `brew install formula_2` |
# | [formula_1](https://github.com/user/repo3) | helpful text | `brew install formula_3` |
#
# Simply place the following in your README or wrap your project in these comment tags:
# <!-- project_table_start -->
# TABLE HERE
# <!--project_table_end -->
#
# Finally, mark `update_readme_table` as `true` in your GitHub Action config and we'll do the work of building a custom table for you.
# Default is `false`.
update_readme_table: true

# Skips committing the generated formula to a homebrew tap (useful for local testing).
# Default is shown.
skip_commit: false

# Logs debugging info to console.
# Default is shown.
debug: true

0 comments on commit ca3cbbc

Please sign in to comment.