Flutter lightweight environment for use in GitHub Actions. It works on Linux, Windows, and macOS.
Originally created by Alif Rachmawadi and Bartek Pacia.
Currently maintained by Artemis Kushner
Code taken from https://github.com/PlugFox/docker_flutter, big thanks for Mike Matyunin
The following sections show how to configure this action.
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: arxdeus/flutter-action@v1
with:
flutter-version: 3.19.0
- run: flutter --version
This action supports "alternative Flutters" in addition to the official
flutter/flutter
, for example:
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: arxdeus/flutter-action@v1
with:
flutter-version: 3.24.0
git-source: https://github.com/Flutter-Foundation/flutter.git
- run: flutter --version
Build Android APK and app bundle:
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: arxdeus/flutter-action@v1
with:
flutter-version: 3.29.2
- run: flutter pub get
- run: flutter test
- run: flutter build apk
- run: flutter build appbundle
Note
Building for iOS requires a macOS runner.
jobs:
main:
runs-on: macos-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: arxdeus/flutter-action@v1
with:
flutter-version: 3.29.2
- run: flutter pub get
- run: flutter test
- run: flutter build ios --release --no-codesign
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.29.2
- run: flutter pub get
- run: flutter test
- run: flutter build web
jobs:
main:
runs-on: windows-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: arxdeus/flutter-action@v1
with:
flutter-version: 3.29.2
- run: flutter build windows
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: arxdeus/flutter-action@v1
with:
flutter-version: 3.29.2
- run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
- run: flutter build linux
Note
Building for macOS requires a macOS runner.
jobs:
main:
runs-on: macos-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: arxdeus/flutter-action@v1
with:
flutter-version: 3.29.2
- run: flutter build macos