Skip to content

Commit 6a92730

Browse files
ci: replace deployment job for reuse workflow
1 parent 2a6982f commit 6a92730

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

.github/workflows/base.yaml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222

2323
steps:
2424
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 1 # Use shallow clone for faster checkout
2527

2628
- name: Check broken links
2729
uses: JustinBeckwith/linkinator-action@v1
@@ -34,10 +36,18 @@ jobs:
3436
distribution: 'zulu'
3537
java-version: '11'
3638

39+
- name: Get Flutter version by FVM
40+
uses: kuhnroyal/flutter-fvm-config-action@v2
41+
id: fvm-config-action
42+
with:
43+
path: ".fvmrc"
44+
3745
- name: Flutter action
3846
uses: subosito/flutter-action@v2
3947
with:
40-
channel: 'stable'
48+
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
49+
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
50+
architecture: x64
4151
cache: true
4252

4353
- name: Install dependencies
@@ -65,19 +75,8 @@ jobs:
6575
flutter build web
6676
6777
deployment:
68-
if: ${{ github.ref_type == 'tag' }}
69-
needs: build
70-
name: Deploy package
7178
permissions:
7279
id-token: write
73-
runs-on: ubuntu-latest
74-
steps:
75-
- uses: actions/checkout@v4
76-
- uses: dart-lang/setup-dart@v1
77-
- name: Flutter action
78-
uses: subosito/flutter-action@v2
79-
with:
80-
channel: 'stable'
81-
cache: true
82-
- name: Publish package
83-
run: dart pub publish -v -f
80+
uses: flutter-form-builder-ecosystem/.github/.github/workflows/deployment.yaml@main
81+
if: ${{ github.ref_type == 'tag' }}
82+
needs: build

0 commit comments

Comments
 (0)