-
-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (39 loc) · 1.34 KB
/
update-version.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
name: update-version
on:
workflow_dispatch:
push:
branches:
- 'main'
paths:
- 'pubspec.yaml'
jobs:
update:
runs-on: ubuntu-latest
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v3
# https://github.com/dart-lang/setup-dart
- uses: dart-lang/setup-dart@v1
# https://github.com/actions/cache
- uses: actions/cache@v3
with:
path: |
${{ env.PUB_CACHE }}
${{ github.workspace }}/.packages
${{ github.workspace }}/.dart_tool/package_config.json
key: ${{ runner.os }}-pubspec-${{ hashFiles(format('{0}{1}', github.workspace, '/pubspec.lock')) }}
- name: check pubspec.yaml
run: |
dart pub get
dart pub run build_runner build --delete-conflicting-outputs
# https://github.com/peter-evans/create-pull-request
- name: create pull request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: update version
title: Update version
body: This was automatically generated by the [${{ github.workflow }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}).
base: main
branch: update-version
branch-suffix: short-commit-hash