From 0e3dfa4c42279d7118f5c19333565ef93b67e512 Mon Sep 17 00:00:00 2001 From: Dario Vladovic Date: Tue, 16 Jun 2020 21:45:08 +0200 Subject: [PATCH] Add CD action to update Homebrew formula --- .github/workflows/cd.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 3c059f23..a967c18c 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 @@ -39,7 +39,7 @@ jobs: run: | rustup target add x86_64-unknown-linux-musl sudo apt-get -qq install musl-tools - + - name: Build Release Mac if: matrix.os == 'macos-latest' run: make release-mac @@ -71,13 +71,21 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Bump Brew + - name: Bump extrawurst/homebrew-tap formula if: matrix.os == 'macos-latest' - env: + env: HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.BREW_TOKEN }} run: | brew tap extrawurst/tap brew bump-formula-pr -f --version=${{ steps.get_version.outputs.version }} --no-browse --no-audit \ --sha256=${{ steps.shasum.outputs.sha }} \ --url="https://github.com/extrawurst/gitui/releases/download/${{ steps.get_version.outputs.version }}/gitui-mac.tar.gz" \ - extrawurst/tap/gitui \ No newline at end of file + extrawurst/tap/gitui + + - name: Bump homebrew-core formula + uses: mislav/bump-homebrew-formula-action@v1 + if: "matrix.os == 'macos-latest' && !contains(github.ref, '-')" # skip prereleases + env: + COMMITTER_TOKEN: ${{ secrets.BREW_TOKEN }} + with: + formula-name: gitui