Skip to content

New publish method #125

New publish method

New publish method #125

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Flutter
on:
pull_request:
branches: ["main", "dev"]
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Java JDK
uses: actions/[email protected]
with:
distribution: temurin
java-version: "17"
- name: Flutter action
uses: subosito/[email protected]
with:
channel: stable
- name: Flutter version
run: flutter --version
- name: Cache pubspec dependencies
uses: actions/[email protected]
with:
path: |
${{ env.FLUTTER_HOME }}/.pub-cache
**/.packages
**/.flutter-plugins
**/.flutter-plugin-dependencies
**/.dart_tool/package_config.json
key: build-pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
build-pubspec-
- name: Cache build runner
uses: actions/[email protected]
with:
path: |
**/.dart_tool
**/*.g.dart
**/*.mocks.dart
**/*.config.dart
key: build-runner-${{ hashFiles('**/asset_graph.json', '**/*.dart', '**/pubspec.lock', '**/outputs.json') }}
restore-keys: |
build-runner-
- name: Download pub dependencies
run: flutter pub get
- name: Upgrade pub dependencies
run: flutter pub upgrade
- name: Run analyzer
run: flutter analyze
- name: Install coverage tools
run: flutter pub global activate coverage
- name: Run tests
run: flutter test --coverage
- name: Upload Coverage to CodeCov
uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
file: coverage/lcov.info
- name: Check Publish Warnings
run: flutter pub publish --dry-run