diff --git a/.github/workflows/homebrew.yml b/.github/workflows/homebrew.yml new file mode 100644 index 000000000..e6598bba5 --- /dev/null +++ b/.github/workflows/homebrew.yml @@ -0,0 +1,29 @@ +name: Update Homebrew Formula + +on: + push: + branches: + - master + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + +jobs: + update-formula: + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v3 + + - name: Update Homebrew Formula + run: sed -i '' 's/:tag => "[^"]*"/:tag => "${{ github.ref_name }}"/' ./Formula/renterd.rb + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5.0.2 + with: + token: ${{ secrets.HOMEBREW_CREATE_PR }} + commit-message: Update renterd formula to ${{ github.ref_name }}" + title: 'Update renterd formula to ${{ github.ref_name }}' + body: 'This is an automated PR to update the formula' + branch: bot/update-renterd + base: master