ci: rmeove unused property #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Base | |
on: | |
push: | |
branches: [main] | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+*' | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build package & run tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
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 --no-pub --coverage | |
- name: Check publish warnings | |
run: dart pub publish --dry-run | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
files: coverage/lcov.info | |
name: form_builder_cupertino_fields | |
- name: Build example | |
run: | | |
cd example | |
flutter build appbundle --debug | |
flutter build ios --debug --no-codesign | |
flutter build web | |
deployment: | |
if: ${{ github.ref_type == 'tag' }} | |
needs: build | |
name: Deploy package | |
permissions: | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 # Use shallow clone for faster checkout | |
- uses: dart-lang/setup-dart@v1 | |
- name: Get Flutter version by FVM | |
uses: kuhnroyal/flutter-fvm-config-action@v2 | |
id: fvm-config-action | |
with: | |
path: ".fvmrc" | |
- name: Set up Flutter | |
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: Publish package | |
run: dart pub publish -v -f |