diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f3f1178..41f3851 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -158,11 +158,33 @@ jobs: body_path: RELEASE_NOTES.md append_body: true + check_homebrew_tap_token: + name: Check Homebrew Tap Token + runs-on: ubuntu-latest + needs: release + outputs: + has_token: ${{ steps.check.outputs.has_token }} + steps: + - name: Check token availability + id: check + shell: bash + env: + HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} + run: | + if [[ -n "${HOMEBREW_TAP_TOKEN}" ]]; then + echo "has_token=true" >> "$GITHUB_OUTPUT" + else + echo "has_token=false" >> "$GITHUB_OUTPUT" + echo "Homebrew tap update skipped because HOMEBREW_TAP_TOKEN is not set." + fi + update_homebrew_tap: name: Update Homebrew Tap Formula runs-on: ubuntu-latest - needs: release - if: ${{ secrets.HOMEBREW_TAP_TOKEN != '' }} + needs: + - release + - check_homebrew_tap_token + if: ${{ needs.check_homebrew_tap_token.outputs.has_token == 'true' }} steps: - name: Download Artifacts uses: actions/download-artifact@v4