Automates the build and deployment of your Flutter web app on GitHub Pages.
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 }}| Name | Description | Default |
|---|---|---|
| release | If set to true, it will run release builds, otherwise debug builds | false |
| keystore | Base64 encoded keystore.jks, required if release is true | "" |
| keystore-pwd | Keystore password, required if release is true | "" |
| key-pwd | Key password, required if release is true | "" |
| aab_generation | Generate AAB | false |
| apk_generation | Generate APK | false |
| ipa_generation | Generate IPA (iOS) | false |
| dmg_generation | Generate DMG (macOS) | false |
| appImage_generation | Generate LINUX APPIMAGE (Linux) | false |
| exe_generation | Generate EXE (Windows) | false |
| gh_pages | Deploy to GitHub Pages | false |
| build_runner_build | Build Runner Build | false |
| change_splash | Change Splash | false |
| i18n_generation | Generate i18n | false |
| generate_launcher_icons | Generate Launcher Icons | false |
| custom_app_name | Custom App Name (Leave empty to skip) | "" |
| custom_package_name | Custom Package Name (Leave empty to skip) | "" |
| webRenderer | Which web renderer to be used, default is auto | "auto" |
| workingDir | The directory where the project is (default .) | "." |
| targetBranch | Target branch for GitHub Pages deployment | "gh-pages" |
| baseHref | Base href (if applicable) | "/" |
| customArgs | Custom args like: --dart-define="key=value" | "" |
| Name | Description |
|---|---|
| apk-path | Path to built APK if build-type was set to APK or AAB |
| aab-path | Path to built AAB if build-type was set to AAB or AAB |
| ipa-path | Path to built IPA file if build-type was set for iOS |
| dmg-path | Path to built DMG file if build-type was set for macOS |
| appImage-path | Path to built APPIMAGE file if build-type was set for Linux |
| exe-path | Path to built EXE file if build-type was set for Windows |
- 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.
uses: antinna/fa@v1with:
release: trueapk_generation: truegh_pages: trueuses: antinna/fa@v1with:
release: trueaab_generation: truegh_pages: trueuses: antinna/fa@v1with:
release: trueipa_generation: truegh_pages: trueuses: antinna/fa@v1with:
release: truedmg_generation: truegh_pages: trueuses: antinna/fa@v1with:
release: trueappImage_generation: truegh_pages: trueuses: antinna/fa@v1with:
release: trueexe_generation: truegh_pages: trueuses: antinna/fa@v1with:
release: truecustom_app_name: "MyCustomAppName"custom_package_name: "com.example.custom"gh_pages: trueuses: antinna/fa@v1with:
release: truecustomArgs: "--dart-define=KEY=VALUE"gh_pages: trueThis action is licensed under the BSD License.