feat: add reusable Flutter build actions for android, ios, macos, windows, and linux
Update README Actions Table / update-readme (push) Successful in 7s

This commit is contained in:
2026-10-18 13:55:08 -07:00
parent 56dd7d58b3
commit 7a12bb1cc6
11 changed files with 1669 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
# Flutter Build Windows
Composite action to build Windows Flutter desktop applications, compile Inno Setup (`.exe`) and MSIX (`.msix`) installers, sign updates with WinSparkle DSA keys, and generate release metadata.
## Inputs
| Name | Description | Required | Default |
| :--- | :--- | :--- | :--- |
| `working_directory` | Path to the Flutter app package directory. | No | `.` |
| `arch` | Target Windows architecture (`x64` or `arm64`). | No | `x64` |
| `build_args` | Extra arguments passed to `flutter build windows`. | No | `''` |
| `build_inno_setup` | Whether to compile an Inno Setup installer (`.exe`). | No | `true` |
| `inno_setup_script` | Path to Inno Setup `.iss` script relative to `working_directory`. | No | `windows/installer/inno_setup.iss` |
| `output_dir` | Output directory for compiled Inno Setup installer. | No | `dist` |
| `exe_filename` | Expected installer filename for metadata JSON. | No | `''` |
| `build_msix` | Whether to build an MSIX package using `msix:create`. | No | `true` |
| `msix_output_name` | Output base name for the MSIX package. | No | `''` |
| `pfx_base64` | Base64-encoded Windows Authenticode `.pfx` certificate. | No | `''` |
| `pfx_password` | Password for the Windows `.pfx` certificate. | No | `''` |
| `sparkle_dsa_private_key` | WinSparkle DSA private key content (PEM) for signing installer. | No | `''` |
| `sparkle_dsa_key_file` | Fallback path to WinSparkle DSA private key file in repository. | No | `signing/sparkle/dsa_priv.pem` |
| `generate_metadata_json` | Whether to generate `windows_<arch>_metadata.json` and `windows_signature.txt`. | No | `false` |
## Outputs
| Name | Description |
| :--- | :--- |
| `version` | Resolved package version from `pubspec.yaml`. |
| `exe_path` | Path to compiled Inno Setup `.exe` installer. |
| `msix_path` | Path to generated `.msix` installer. |
| `signature` | WinSparkle DSA signature if generated. |
| `metadata_path` | Path to generated `windows_<arch>_metadata.json`. |
## Example Usage
```yaml
- name: Build & Package Windows Release
uses: rodydavis/shared-actions/flutter-build-windows@main
with:
working_directory: packages/sfw_desktop
arch: ${{ matrix.arch }}
build_args: --dart-define=API_BASE_URL=https://slidesforworship.app
msix_output_name: slides_for_worship_${{ matrix.arch }}
pfx_base64: ${{ secrets.WINDOWS_PFX_BASE64 }}
pfx_password: ${{ secrets.WINDOWS_PFX_PASSWORD }}
sparkle_dsa_private_key: ${{ secrets.SPARKLE_DSA_PRIVATE_KEY }}
generate_metadata_json: 'true'
```