update-tap #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update | |
on: | |
repository_dispatch: | |
types: [update-tap] # with client_payload.packages | |
workflow_dispatch: | |
inputs: | |
sha256_linux: | |
required: true | |
default: '' | |
sha256_macos: | |
required: true | |
default: '' | |
version: | |
required: true | |
default: '' | |
jobs: | |
update-tap: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Update formula | |
shell: bash | |
run: | | |
sed \ | |
-e 's/{{ version }}/${{ github.event.client_payload.version }}/g' \ | |
-e 's/{{ sha256_linux }}/${{ github.event.client_payload.sha256_linux }}/g' \ | |
-e 's/{{ sha256_macos }}/${{ github.event.client_payload.sha256_macos }}/g' \ | |
fluttergen_template.rb > Formula/fluttergen.rb | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
token: ${{ secrets.PAT_FLUTTERGEN }} | |
commit-message: "feat: bump up to ${{ github.event.client_payload.version }}" | |
branch: update-tap | |
delete-branch: true | |
title: "feat: bump up to ${{ github.event.client_payload.version }}" | |
- name: Enable Pull Request Automerge | |
if: steps.cpr.outputs.pull-request-operation == 'created' | |
uses: peter-evans/enable-pull-request-automerge@v2 | |
with: | |
token: ${{ secrets.PAT_FLUTTERGEN }} | |
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} | |
merge-method: squash |