diff --git a/.github/workflows/publish-github-release.yml b/.github/workflows/publish-github-release.yml index ceccebf..bc50c98 100644 --- a/.github/workflows/publish-github-release.yml +++ b/.github/workflows/publish-github-release.yml @@ -165,4 +165,28 @@ jobs: name: snm.rb path: snm.rb - + # 新增的步骤:创建 PR + - name: Checkout homebrew-shined repository + uses: actions/checkout@v3 + with: + repository: ityuany/homebrew-shined + token: ${{ secrets.HOMEBREW_GITHUB_TOKEN }} + path: homebrew-shined + + - name: Copy snm.rb to homebrew-shined + run: | + cp snm.rb homebrew-shined/snm.rb + cd homebrew-shined + git add snm.rb + git commit -m "Update snm.rb to version ${{ github.ref_name }}" + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + with: + token: ${{ secrets.HOMEBREW_GITHUB_TOKEN }} + commit-message: "Update snm.rb to version ${{ github.ref_name }}" + title: "Update snm.rb to version ${{ github.ref_name }}" + body: "This PR updates snm.rb to version ${{ github.ref_name }}." + branch: update-snm-rb-${{ github.ref_name }} + base: main + \ No newline at end of file