diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b98f5fc..06264d0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -104,6 +104,11 @@ jobs: ## Installation + ### Homebrew (macOS and Linux) + ```bash + brew install enthus-appdev/tap/esq + ``` + ### macOS (Apple Silicon) ```bash curl -L https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/esq-darwin-arm64.tar.gz | tar xz @@ -135,3 +140,32 @@ jobs: dist/* draft: false prerelease: ${{ contains(github.ref_name, '-') }} + + - name: Generate GitHub App token for tap bump + id: app-token + uses: actions/create-github-app-token@v2 + with: + app-id: ${{ secrets.HOMEBREW_TAP_APP_ID }} + private-key: ${{ secrets.HOMEBREW_TAP_APP_PRIVATE_KEY }} + owner: enthus-appdev + repositories: homebrew-tap + + - name: Get GitHub App user ID + id: app-user + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} + run: | + USER_ID=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id) + echo "user-id=$USER_ID" >> "$GITHUB_OUTPUT" + + - name: Bump Homebrew tap formula + uses: dawidd6/action-homebrew-bump-formula@v7 + continue-on-error: true + with: + token: ${{ steps.app-token.outputs.token }} + no_fork: true + tap: enthus-appdev/homebrew-tap + formula: esq + tag: ${{ github.ref_name }} + user_name: ${{ steps.app-token.outputs.app-slug }}[bot] + user_email: ${{ steps.app-user.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com