Add README for setup-flutter and update main actions index table
This commit is contained in:
@@ -12,6 +12,7 @@ This repository contains reusable composite actions for CI/CD workflows across o
|
|||||||
| [Enforce Flutter Version Constraint](./enforce-flutter-version) | Scans all pubspec.yaml files to ensure they use the required Flutter SDK constraint. | `rodydavis/shared-actions/enforce-flutter-version@main` |
|
| [Enforce Flutter Version Constraint](./enforce-flutter-version) | Scans all pubspec.yaml files to ensure they use the required Flutter SDK constraint. | `rodydavis/shared-actions/enforce-flutter-version@main` |
|
||||||
| [Run Buildifier](./run-buildifier) | Downloads and runs buildifier on Starlark files. | `rodydavis/shared-actions/run-buildifier@main` |
|
| [Run Buildifier](./run-buildifier) | Downloads and runs buildifier on Starlark files. | `rodydavis/shared-actions/run-buildifier@main` |
|
||||||
| [Setup Bazel (Bazelisk)](./setup-bazel) | Installs Node, Bazelisk, and configures Git for private SSH dependencies. | `rodydavis/shared-actions/setup-bazel@main` |
|
| [Setup Bazel (Bazelisk)](./setup-bazel) | Installs Node, Bazelisk, and configures Git for private SSH dependencies. | `rodydavis/shared-actions/setup-bazel@main` |
|
||||||
|
| [Setup Flutter](./setup-flutter) | Cross-platform setup for Flutter with caching on macOS, Windows, and Linux. | `rodydavis/shared-actions/setup-flutter@main` |
|
||||||
|
|
||||||
<!-- END_ACTIONS_TABLE -->
|
<!-- END_ACTIONS_TABLE -->
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
# Setup Flutter
|
||||||
|
|
||||||
|
Cross-platform composite action to set up the Flutter SDK with automated caching on macOS, Windows, and Linux. Supports local Git mirrors with automatic fallback to upstream GitHub.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- **Multi-OS Support**: Native setup for macOS (Apple Silicon & Intel), Windows (PowerShell), and Linux.
|
||||||
|
- **Git Mirror & Fallback**: Clones from local Gitea Flutter mirror (`https://git.rodydavis.dev/rodydavis/flutter.git`) with automatic fallback to `https://github.com/flutter/flutter.git`.
|
||||||
|
- **SDK Caching**: Uses `actions/cache@v3` to cache the full Flutter SDK directory across workflow runs based on OS, CPU architecture, and version.
|
||||||
|
- **Desktop Windowing**: Automatically configures desktop windowing support and exports Flutter to `$GITHUB_PATH`.
|
||||||
|
|
||||||
|
## Inputs
|
||||||
|
|
||||||
|
| Name | Description | Required | Default |
|
||||||
|
| :--- | :--- | :--- | :--- |
|
||||||
|
| `version` | Flutter channel, tag, or branch (e.g., `master`, `stable`, `3.29.0`). | No | `master` |
|
||||||
|
| `mirror_url` | Git repository URL for Flutter SDK mirror. | No | `https://git.rodydavis.dev/rodydavis/flutter.git` |
|
||||||
|
| `git_token` | Gitea token for authenticated git mirror access. | No | `''` |
|
||||||
|
| `cache` | Enable Flutter SDK caching across CI runs. | No | `true` |
|
||||||
|
| `enable_windowing` | Enable desktop windowing and platform configs. | No | `true` |
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
### Basic Usage (Master Channel)
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Set up Flutter
|
||||||
|
uses: rodydavis/shared-actions/setup-flutter@main
|
||||||
|
with:
|
||||||
|
version: master
|
||||||
|
git_token: ${{ secrets.GIT_TOKEN }}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Specific Version Tag with Caching
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Set up Flutter 3.29.0
|
||||||
|
uses: rodydavis/shared-actions/setup-flutter@main
|
||||||
|
with:
|
||||||
|
version: '3.29.0'
|
||||||
|
cache: 'true'
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user