Upgrade Flutter Dependencies #886
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: Upgrade Flutter Dependencies | |
on: | |
schedule: | |
- cron: '0 21 * * *' # everyday, 21:00 (UTC) | |
workflow_dispatch: | |
jobs: | |
upgrade_flutter_dependencies: | |
runs-on: macos-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2.12.0 | |
with: | |
cache: true | |
- run: flutter doctor -v | |
- name: setup flutter channel | |
shell: zsh {0} # See: https://github.com/actions/virtual-environments/issues/264#issuecomment-574032011 | |
run: ./scripts/setup_flutter.sh | |
- name: setup flutter desktop | |
shell: bash | |
run: .github/scripts/macos/install_additional_requirements_for_flutter.sh | |
- run: flutter pub get | |
- run: flutter pub upgrade | |
- run: flutter pub upgrade --major-versions | |
# https://github.com/flutter/flutter/issues/73845#issue-785022394 | |
- run: rm macos/Podfile.lock && flutter build macos | |
- name: upgrade external binary | |
shell: zsh {0} | |
run: ./scripts/fetch_libedax_assets.sh | |
# See: https://github.com/peter-evans/create-pull-request/tree/master#reference-example | |
- name: create PR | |
id: create_pull_request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
# See: https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#triggering-further-workflow-runs | |
# See: https://github.com/peter-evans/create-pull-request/issues/48#issuecomment-537478081 | |
token: ${{ secrets.PAT }} | |
# See: https://github.com/peter-evans/create-pull-request/issues/593 | |
committer: GitHub <noreply@github.com> | |
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
commit-message: '`flutter pub upgrade && flutter pub upgrade --major-versions`' | |
title: '`flutter pub upgrade && flutter pub upgrade --major-versions`' | |
body: | | |
Auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request) | |
--- | |
See: https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#triggering-further-workflow-runs | |
branch: cron_upgrade_flutter_dependencies | |
delete-branch: true | |
labels: dependencies | |
# See: https://github.com/peter-evans/create-pull-request/tree/main#auto-merge | |
- name: enable auto-merge | |
if: steps.create_pull_request.outputs.pull-request-operation == 'created' | |
uses: peter-evans/enable-pull-request-automerge@v3 | |
with: | |
token: ${{ secrets.PAT }} | |
pull-request-number: ${{ steps.create_pull_request.outputs.pull-request-number }} | |
merge-method: squash |