From c3a25bbfad3c2234ba9195eeda35f252410ae5a7 Mon Sep 17 00:00:00 2001 From: Chris Addams Date: Fri, 27 Mar 2026 19:52:46 +0000 Subject: [PATCH] Open PR on tap repo instead of pushing directly --- .github/workflows/release.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 346ba4b..428d7fa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -104,8 +104,22 @@ jobs: envsubst < .github/formula-template.rb > tap/Formula/anythink.rb cd tap + BRANCH="update-formula-v${VERSION}" git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" + git checkout -b "${BRANCH}" git add Formula/anythink.rb git commit -m "Update anythink to v${VERSION}" - git push + git push -u origin "${BRANCH}" + + # Create PR using GitHub API + curl -s -X POST \ + -H "Authorization: token ${TAP_TOKEN}" \ + -H "Accept: application/vnd.github+json" \ + https://api.github.com/repos/anythink-cloud/homebrew-tap/pulls \ + -d "{ + \"title\": \"Update anythink to v${VERSION}\", + \"body\": \"Automated formula update from [release v${VERSION}](https://github.com/anythink-cloud/anythink-cli/releases/tag/v${VERSION})\", + \"head\": \"${BRANCH}\", + \"base\": \"main\" + }"