File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,11 +82,23 @@ jobs:
8282 git config --local user.email "action@github.com"
8383 git config --local user.name "GitHub Action"
8484
85+ # Create a new branch for the formula update
86+ BRANCH_NAME="homebrew-${{ steps.release.outputs.version }}"
87+ git checkout -b "$BRANCH_NAME"
88+
8589 git add Formula/agentx.rb
8690
8791 if git diff --staged --quiet; then
8892 echo "No changes to commit"
8993 else
9094 git commit -m "chore: update homebrew formula to ${{ steps.release.outputs.version }}"
91- git push origin HEAD:master
95+ git push origin "$BRANCH_NAME"
96+
97+ # Create PR using GitHub CLI
98+ gh pr create --title "chore: update homebrew formula to ${{ steps.release.outputs.version }}" \
99+ --body "Automated PR to update Homebrew formula for release ${{ steps.release.outputs.version }}" \
100+ --base master \
101+ --head "$BRANCH_NAME"
92102 fi
103+ env :
104+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments