File: flutter-pub-update.yml

package info (click to toggle)
kddockwidgets 2.4.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,412 kB
  • sloc: cpp: 50,019; ansic: 765; python: 239; xml: 61; makefile: 14; sh: 7
file content (51 lines) | stat: -rw-r--r-- 1,296 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# 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 }}