-
-
Notifications
You must be signed in to change notification settings - Fork 21
78 lines (66 loc) · 1.95 KB
/
base.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Base
on:
push:
branches: [main]
tags:
- '[0-9]+.[0-9]+.[0-9]+*'
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1 # Use shallow clone for faster checkout
- name: Check broken links
uses: JustinBeckwith/linkinator-action@v1
with:
paths: "**/*.md"
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
- name: Get Flutter version by FVM
uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action
with:
path: ".fvmrc"
- name: Flutter action
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
architecture: x64
cache: true
- name: Install dependencies
run: flutter pub get
- name: Format code
run: dart format --set-exit-if-changed .
- name: Analyze static code
run: flutter analyze
- name: Run tests
run: flutter test --coverage
- name: Check publish warnings
run: dart pub publish --dry-run
- name: Build example
run: |
cd example
flutter build appbundle --debug
flutter build ios --debug --no-codesign
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: coverage/lcov.info
flags: unittests
name: form_builder_phone_field
deployment:
permissions:
id-token: write
uses: flutter-form-builder-ecosystem/.github/.github/workflows/deployment.yaml@main
if: ${{ github.ref_type == 'tag' }}
needs: build