A GitHub Action to install Flutter SDK with intelligent caching support for faster CI/CD workflows.
- Multi-channel support: Stable, beta, and dev channels
- Version flexibility: Install specific versions or latest from channel
- Intelligent caching: Caches Flutter SDK, pub packages, and Gradle dependencies
- Java integration: Optional Temurin Java setup for Android development
- Cross-platform: Works on Linux, macOS, and Windows runners
- Optimized performance: Precaches Flutter artifacts and manages dependencies
- name: Setup Flutter
uses: bancolombia/flutter-setup-action@v1- name: Setup Flutter
uses: bancolombia/flutter-setup-action@v1
with:
channel: 'stable'
flutter-version: '3.32.0'
java-version: '17'
cache: 'true'
cache-key-suffix: 'v1'name: Flutter CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Flutter
uses: bancolombia/flutter-setup-action@v1
with:
channel: 'stable'
flutter-version: 'latest'
java-version: '17'
cache: 'true'
- name: Get dependencies
run: flutter pub get
- name: Run tests
run: flutter test
- name: Build APK
run: flutter build apk| Input | Description | Required | Default | Examples |
|---|---|---|---|---|
channel |
Flutter channel to install | No | stable |
stable, beta, dev |
flutter-version |
Exact Flutter version or "latest" | No | latest |
3.32.0, latest |
java-version |
Temurin Java version (empty to skip) | No | 17 |
11, 17, 21 |
cache |
Enable caching for faster builds | No | true |
true, false |
cache-key-suffix |
Suffix for manual cache invalidation | No | "" |
v1, 2024-01 |
| Platform | Status | Notes |
|---|---|---|
| Ubuntu (Linux) | Full support | Includes desktop development dependencies |
| macOS | Full support | iOS and macOS development ready |
| Windows | Full support | Windows app development ready |
The action automatically installs required Linux dependencies:
- Build essentials:
clang,cmake,ninja-build - Desktop development:
libgtk-3-dev,libglu1-mesa - Standard utilities:
curl,git,unzip,xz-utils,zip
When java-version is specified, the action uses actions/setup-java@v4 with Temurin distribution.
If you encounter cache-related problems, use cache-key-suffix to force cache invalidation:
- uses: bancolombia/flutter-setup-action@v1
with:
cache-key-suffix: 'rebuild-2024-01'Ensure your flutter-version is available in the specified channel. Check Flutter releases for compatibility.
- Flutter 3.3+: Requires Java 11 or higher
- Android Gradle Plugin 8.0+: Requires Java 17 or higher
We welcome contributions! Please see our contributing guidelines for details.
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Open an issue in this repository
- Check existing issues for similar problems
- Review Flutter's official documentation
See RELEASES for version history and changes.