From f40f5357d2b9b3d038bbe80067e4a3a44f94e9ba Mon Sep 17 00:00:00 2001 From: sgoudham Date: Mon, 31 Jan 2022 22:53:54 +0000 Subject: [PATCH] Add homebrew deploy action --- .github/workflows/deploy.yml | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cc3f76e..0caeb1a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -106,6 +106,18 @@ jobs: asset_path: ${{ env.BIN }}.tar.gz asset_name: ${{ env.BIN }}-${{ matrix.target }}.tar.gz asset_content_type: application/gzip + - uses: mislav/bump-homebrew-formula-action@v1 + if: "!contains(github.ref, '-')" # skip prereleases + with: + formula-name: ${{ env.BIN }} + homebrew-tap: sgoudham/tap + download-url: https://github.com/sgoudham/${{ env.BIN }}/releases/download/${{ github.ref }}/${{ env.BIN }}-${{ matrix.target }}.tar.gz + commit-message: | + {{formulaName}} {{version}} + + Created by https://github.com/mislav/bump-homebrew-formula-action + env: + COMMITTER_TOKEN: ${{ secrets.HOMEBREW }} linux: runs-on: ubuntu-latest @@ -144,4 +156,26 @@ jobs: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ${{ env.BIN }}.tar.gz asset_name: ${{ env.BIN }}-${{ matrix.target }}.tar.gz - asset_content_type: application/gzip \ No newline at end of file + asset_content_type: application/gzip + homebrew: + name: Bump Homebrew formula + needs: macos + runs-on: ubuntu-latest + steps: + - name: Extract version + id: extract-version + run: | + printf "::set-output name=%s::%s\n" tag-name "${GITHUB_REF#refs/tags/}" + - uses: mislav/bump-homebrew-formula-action@v1 + if: "!contains(github.ref, '-')" # skip prereleases + with: + formula-name: ${{ env.BIN }} + formula-path: Formula/${{ env.BIN }}.rb + homebrew-tap: sgoudham/tap + download-url: https://github.com/sgoudham/${{ env.BIN }}/releases/download/${{ github.ref }}/${{ env.BIN }}-${{ matrix.target }}.tar.gz + commit-message: | + {{formulaName}} {{version}} + + Created by https://github.com/mislav/bump-homebrew-formula-action + env: + COMMITTER_TOKEN: ${{ secrets.HOMEBREW }} \ No newline at end of file