52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
|
|
|
|
# On demand flutter action to trigger flutter pub upgrade
|
|
|
|
name: (Scheduled) Runs flutter pub upgrade
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 0 1 * *" # monthly
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: "main" # always main branch
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt update -qq
|
|
sudo apt install wget curl file unzip zip xz-utils -y
|
|
|
|
- name: Install Flutter SDK
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: "3.x"
|
|
channel: "stable"
|
|
|
|
- name: Setup git author name
|
|
uses: fregante/setup-git-user@v2
|
|
|
|
- name: pub upgrade on examples
|
|
run: |
|
|
cd examples/flutter
|
|
flutter pub upgrade --major-versions
|
|
|
|
- name: pub upgrade on src/flutter/dart
|
|
run: |
|
|
cd src/flutter/dart
|
|
flutter pub upgrade --major-versions
|
|
|
|
- name: Create PR
|
|
run: sh src/flutter/create_pub_upgrade_pr.sh
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|