-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (40 loc) · 1.29 KB
/
major-dependency-upgrades.yaml
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
name: Major Dependency Upgrades
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"
jobs:
upgrade-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
cache: true
- name: Pub cache
uses: actions/cache@v3
env:
cache-name: pub-cache
with:
path: ${{ env.PUB_CACHE }}
key: ${{ env.cache-name }}-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ env.cache-name }}-
# Don't use puby because this IS puby
# - name: Activate puby
# run: dart pub global activate puby
- name: Upgrade dependencies
run: dart pub upgrade --major-versions
- name: Check pubspec diff
id: pubspec_check
run: |
if [[ `git status --porcelain **\pubspec.yaml` ]]; then
echo "::set-output name=changed::true"
fi
- name: Create Pull Request
if: steps.pubspec_check.outputs.changed
uses: peter-evans/create-pull-request@v4
with:
branch: dependencies/major-upgrades
commit-message: "Upgraded dependency major versions"
title: "[CI] Major Dependency Upgrades"
body: "Upgraded dependency major versions"