From ca3cbbc21f60ff2d0b60b1bbfccdd932844968bb Mon Sep 17 00:00:00 2001 From: Alec Reynolds Date: Mon, 10 Oct 2022 11:32:23 -0700 Subject: [PATCH] Try homebrew-releaser action. --- .github/workflows/release.yml | 80 ++++++++++++++++++++++++++++++----- 1 file changed, 70 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9feaf60..c9928ef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: 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: 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: + # + # TABLE HERE + # + # + # 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