diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5d9826f..9feaf60 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -155,60 +155,18 @@ jobs: releases/${{ matrix.result }} releases/${{ matrix.compressed }} fail_on_unmatched_files: true - - name: Release my project to my Homebrew tap - uses: Justintime50/homebrew-releaser@v1 + - name: Set macOS release SHA 256 + 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 with: - # 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 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: droid@lando.dev - - # 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: true - target_darwin_arm64: true - 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 - - # Logs debugging info to console. - # Default is shown. - debug: true + 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 }}