Skip to content

Commit f1d2b07

Browse files
ci: improve jobs
1 parent d0b3229 commit f1d2b07

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

.github/workflows/base.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 1 # Use shallow clone for faster checkout
2022

2123
- name: Check broken links
2224
uses: JustinBeckwith/linkinator-action@v1
@@ -29,10 +31,19 @@ jobs:
2931
distribution: 'zulu'
3032
java-version: '11'
3133

34+
- name: Get Flutter version by FVM
35+
uses: kuhnroyal/flutter-fvm-config-action@v2
36+
id: fvm-config-action
37+
with:
38+
path: ".fvmrc"
39+
3240
- name: Flutter action
3341
uses: subosito/flutter-action@v2
3442
with:
35-
channel: 'stable'
43+
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
44+
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
45+
architecture: x64
46+
cache: true
3647

3748
- name: Install dependencies
3849
run: flutter pub get
@@ -52,27 +63,16 @@ jobs:
5263
flutter build web
5364
5465
# - name: Upload coverage to Codecov
55-
# if: ${{ matrix.channel == 'stable' }}
5666
# uses: codecov/codecov-action@v3
5767
# with:
5868
# files: coverage/lcov.info
5969
# flags: unittests
6070
# name: form_builder_file_picker
6171

6272
deployment:
63-
if: ${{ github.ref_type == 'tag' }}
64-
needs: build
65-
name: Deploy package
6673
permissions:
6774
id-token: write
68-
runs-on: ubuntu-latest
69-
steps:
70-
- uses: actions/checkout@v4
71-
- uses: dart-lang/setup-dart@v1
72-
- name: Flutter action
73-
uses: subosito/flutter-action@v2
74-
with:
75-
channel: 'stable'
76-
- name: Publish package
77-
run: dart pub publish -v -f
75+
uses: flutter-form-builder-ecosystem/.github/.github/workflows/deployment.yaml@main
76+
if: ${{ github.ref_type == 'tag' }}
77+
needs: build
7878

0 commit comments

Comments
 (0)