feat: add reusable Flutter build actions for android, ios, macos, windows, and linux
Update README Actions Table / update-readme (push) Successful in 7s
Update README Actions Table / update-readme (push) Successful in 7s
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
# Flutter Build macOS
|
||||
|
||||
Composite action to build, sign (Developer ID & Sparkle), package (`.dmg` or `.zip`), notarize, and generate auto-updater metadata for macOS Flutter desktop applications.
|
||||
|
||||
## Inputs
|
||||
|
||||
| Name | Description | Required | Default |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| `working_directory` | Path to the Flutter app package directory. | No | `.` |
|
||||
| `app_name` | Display name of the `.app` bundle (auto-detected if empty). | No | `''` |
|
||||
| `build_args` | Extra arguments passed to `flutter build macos`. | No | `''` |
|
||||
| `disable_spm` | Disable Flutter Swift Package Manager before building. | No | `true` |
|
||||
| `run_pod_install` | Run `pod install` inside `working_directory/macos` before building. | No | `false` |
|
||||
| `package_type` | Packaging format to produce: `dmg`, `zip`, or `both`. | No | `dmg` |
|
||||
| `dmg_filename` | Output DMG filename. | No | `''` |
|
||||
| `zip_filename` | Output ZIP path/filename when `package_type` is `zip` or `both`. | No | `''` |
|
||||
| `entitlements_path` | Path to entitlements plist relative to `working_directory`. | No | `macos/Runner/Release.entitlements` |
|
||||
| `signing_identity` | Fallback Developer ID Application signing identity. | No | `''` |
|
||||
| `certificate_base64` | Base64-encoded Apple `.p12` certificate. | No | `''` |
|
||||
| `certificate_password` | Password for the Apple `.p12` certificate. | No | `''` |
|
||||
| `certificate_file` | Fallback path to local `.p12` certificate file in repository. | No | `signing/macos/certificate.p12` |
|
||||
| `metadata_txt_file` | Fallback path to `metadata.txt` containing p12/notarization credentials. | No | `signing/macos/metadata.txt` |
|
||||
| `provisioning_profile_base64` | Optional Base64-encoded `.provisionprofile`. | No | `''` |
|
||||
| `notarize_apple_id` | Apple ID email for DMG notarization. | No | `''` |
|
||||
| `notarize_password` | Apple ID App-Specific Password for DMG notarization. | No | `''` |
|
||||
| `notarize_team_id` | Apple Developer 10-character Team ID for DMG notarization. | No | `''` |
|
||||
| `sparkle_private_key` | Sparkle EdDSA private key content for signing DMG updates. | No | `''` |
|
||||
| `sparkle_key_file` | Fallback path to Sparkle EdDSA private key file. | No | `signing/sparkle/sparkle_key.pem` |
|
||||
| `generate_metadata_json` | Whether to generate `macos_metadata.json` and `macos_signature.txt`. | No | `false` |
|
||||
| `asc_key_id` | Optional App Store Connect API Key ID for `.pkg` upload. | No | `''` |
|
||||
| `asc_issuer_id` | Optional App Store Connect API Issuer ID for `.pkg` upload. | No | `''` |
|
||||
| `asc_private_key` | Optional App Store Connect API Private Key (`.p8`) for `.pkg` upload. | No | `''` |
|
||||
|
||||
## Outputs
|
||||
|
||||
| Name | Description |
|
||||
| :--- | :--- |
|
||||
| `version` | Resolved package version from `pubspec.yaml`. |
|
||||
| `dmg_path` | Path to generated DMG installer. |
|
||||
| `zip_path` | Path to generated ZIP archive. |
|
||||
| `signature` | Sparkle EdDSA signature if generated. |
|
||||
| `metadata_path` | Path to generated `macos_metadata.json`. |
|
||||
|
||||
## Example Usage
|
||||
|
||||
```yaml
|
||||
- name: Build & Package macOS Release
|
||||
uses: rodydavis/shared-actions/flutter-build-macos@main
|
||||
with:
|
||||
working_directory: packages/sfw_desktop
|
||||
app_name: Slides for Worship
|
||||
package_type: dmg
|
||||
dmg_filename: slides-for-worship-macos-universal.dmg
|
||||
run_pod_install: 'true'
|
||||
build_args: --dart-define=API_BASE_URL=https://slidesforworship.app
|
||||
certificate_base64: ${{ secrets.MACOS_CERTIFICATE }}
|
||||
certificate_password: ${{ secrets.MACOS_CERTIFICATE_PWD }}
|
||||
notarize_apple_id: ${{ secrets.AC_USERNAME }}
|
||||
notarize_password: ${{ secrets.AC_PASSWORD }}
|
||||
notarize_team_id: ${{ secrets.AC_TEAM_ID }}
|
||||
sparkle_private_key: ${{ secrets.SPARKLE_PRIVATE_KEY }}
|
||||
generate_metadata_json: 'true'
|
||||
```
|
||||
Reference in New Issue
Block a user