Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Flutter Web App Builder

Automates the build and deployment of your Flutter web app on GitHub Pages.

Usage

name: Build Flutter App (APK/AAB/IPA), Deploy Flutter web app to GitHub Pageson:
push:
branches:
- mainjobs:
build:
name: Build and Deployruns-on: ${{ matrix.os }}strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest] # No NEED OF Matrix Choose any SIngle But remember Choose as per BUILDinclude:
- os: macos-latestrunner: macos-latest
- os: ubuntu-latestrunner: ubuntu-latest
- os: windows-latestrunner: windows-lateststeps:
- name: Checkout repositoryuses: actions/checkout@v4
- name: Set up Javauses: actions/setup-java@v1with:
java-version: '12.x'
- name: Set up Flutteruses: subosito/flutter-action@v2# with:# flutter-version: '2.x' # any version# Additional steps as needed
- name: Build and deploy Flutter web appuses: antinna/fa@v1id: buildwith:
release: truegh_pages: truewebRenderer: autobaseHref: "/"aab_generation: trueapk_generation: true
- name: Archive APKuses: actions/upload-artifact@v2with:
name: release-apkpath: ${{ steps.build.outputs.apk-path }}
- name: Archive AABuses: actions/upload-artifact@v2with:
name: release-aabpath: ${{ steps.build.outputs.aab-path }}

Inputs

NameDescriptionDefault
releaseIf set to true, it will run release builds, otherwise debug buildsfalse
keystoreBase64 encoded keystore.jks, required if release is true""
keystore-pwdKeystore password, required if release is true""
key-pwdKey password, required if release is true""
aab_generationGenerate AABfalse
apk_generationGenerate APKfalse
ipa_generationGenerate IPA (iOS)false
dmg_generationGenerate DMG (macOS)false
appImage_generationGenerate LINUX APPIMAGE (Linux)false
exe_generationGenerate EXE (Windows)false
gh_pagesDeploy to GitHub Pagesfalse
build_runner_buildBuild Runner Buildfalse
change_splashChange Splashfalse
i18n_generationGenerate i18nfalse
generate_launcher_iconsGenerate Launcher Iconsfalse
custom_app_nameCustom App Name (Leave empty to skip)""
custom_package_nameCustom Package Name (Leave empty to skip)""
webRendererWhich web renderer to be used, default is auto"auto"
workingDirThe directory where the project is (default .)"."
targetBranchTarget branch for GitHub Pages deployment"gh-pages"
baseHrefBase href (if applicable)"/"
customArgsCustom args like: --dart-define="key=value"""

Outputs

NameDescription
apk-pathPath to built APK if build-type was set to APK or AAB
aab-pathPath to built AAB if build-type was set to AAB or AAB
ipa-pathPath to built IPA file if build-type was set for iOS
dmg-pathPath to built DMG file if build-type was set for macOS
appImage-pathPath to built APPIMAGE file if build-type was set for Linux
exe-pathPath to built EXE file if build-type was set for Windows

Platform Support

  • macOS: Apple supported builds can be generated on macOS runner.
  • Windows: Windows supported builds can be generated on Windows runner.
  • Linux: Linux supported builds can be generated on Linux runner.

Examples

Build APK and deploy web app to GitHub Pages

uses: antinna/fa@v1with:
release: trueapk_generation: truegh_pages: true

Generate AAB and deploy web app to GitHub Pages

uses: antinna/fa@v1with:
release: trueaab_generation: truegh_pages: true

Build IPA for iOS and deploy web app to GitHub Pages

uses: antinna/fa@v1with:
release: trueipa_generation: truegh_pages: true

Generate DMG for macOS and deploy web app to GitHub Pages

uses: antinna/fa@v1with:
release: truedmg_generation: truegh_pages: true

Generate Linux AppImage and deploy web app to GitHub Pages

uses: antinna/fa@v1with:
release: trueappImage_generation: truegh_pages: true

Generate EXE for Windows and deploy web app to GitHub Pages

uses: antinna/fa@v1with:
release: trueexe_generation: truegh_pages: true

Customize app name and package name

uses: antinna/fa@v1with:
release: truecustom_app_name: "MyCustomAppName"custom_package_name: "com.example.custom"gh_pages: true

Specify additional custom arguments

uses: antinna/fa@v1with:
release: truecustomArgs: "--dart-define=KEY=VALUE"gh_pages: true

License

This action is licensed under the BSD License.

About

A Complete ✅ Flutter GitHub Action, Good with Mac Runner

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors