From d0fef49761e6671bf0227fe8c141e7619fd0d83e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Boschi?= Date: Fri, 20 Oct 2023 15:57:14 +0200 Subject: [PATCH] Automate brew update after release (#632) --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6c99ac959..33280c18b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,3 +71,33 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} generateReleaseNotes: true prerelease: false + + + homebrew-release: + needs: [ 'release' ] + name: Bump Homebrew CLI and Homebrew mini-langstream formulae + runs-on: ubuntu-latest + steps: + - name: Set output + id: vars + run: | + echo "tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT + echo "version=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_OUTPUT + + - uses: mislav/bump-homebrew-formula-action@v3 + with: + formula-name: Langstream + formula-path: langstream.rb + download-url: https://github.com/LangStream/langstream/releases/download/${{ steps.vars.outputs.tag }}/langstream-cli-${{ steps.vars.outputs.version }}.zip + homebrew-tap: LangStream/homebrew-langstream + env: + COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TOKEN }} + + - uses: mislav/bump-homebrew-formula-action@v3 + with: + formula-name: MiniLangstream + formula-path: mini-langstream.rb + download-url: https://github.com/LangStream/langstream/releases/download/${{ steps.vars.outputs.tag }}/mini-langstream-${{ steps.vars.outputs.version }}.zip + homebrew-tap: LangStream/homebrew-langstream + env: + COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TOKEN }}