Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
download

GitHub Action

Install Flutter SDK

v1.0.0

Install Flutter SDK

download

Install Flutter SDK

Dart and Flutter CLIs available for your GitHub Action

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Install Flutter SDK

uses: monterail/[email protected]

Learn more about this action in monterail/flutter-action

Choose a version

Flutter SDK for GitHub Actions

MIT license PRs Welcome Monterail's logo

Flutter and Dart in your GitHub Actions. Use effortlessly in your project, inspire yourself with our Recipes.

Installation

Copy and paste the following snippet into your action's .yml file.

  - name: Install Flutter
    uses: monterail/flutter-action@v1

Usage

With Flutter SDK for GitHub Actions you can do the following:

steps:
  - uses: monterail/flutter-action@v1
  - run: flutter build ...

Action arguments

monterail/flutter-action@v1 provides sane defaults, assuming the default usage is to get the newest, production-ready, Flutter SDK. For more complex use-cases, customize the action with the non-standard inputs.

Name Description Default
channel Flutter channel stable

Recipes

List of practical applications of monterail/flutter-action@v1 for your project. Click the Details dropdown to see the implementation. Test the recipe by putting it into .github/workflows/action.yml file in your project's repository.

Assure code quality standard for each PR

Will check (and annotate, if necessary) code quality and formatting guidelines set in analysis_options.yaml. Once code quality is checked, will run tests.

name: Lint and Test PRs

on:
  pull_request:
    branches:
      - main

jobs:
  lint:
    runs-on: ubuntu-latest
      steps:
        - uses: actions/checkout@v4
        - uses: monterail/flutter-action@v1
        - run: flutter pub get
        - uses: invertase/github-action-dart-analyzer@v3
          with:
            annotate: true
        - run: dart format --set-exit-if-changed --output none
        - run: flutter test

Build web project artifact on each main push

Load project's dependencies and build web app into a .zip file, stored as an artifact for the given commit.

name: Build web app

on:
  push:
    branches:
      - main

jobs:
  lint:
    runs-on: ubuntu-latest
      steps:
        - uses: actions/checkout@v4
        - uses: monterail/flutter-action@v1
        - run: flutter pub get
        - run: flutter build web
        - uses: actions/upload-artifact@v4
          with:
            name: web-app
            path: build/web