Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure Documentation #284

Merged
merged 1 commit into from
Mar 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

Flutter environment for use in GitHub Actions. It works on Linux, Windows, and macOS.

## Usage
The following sections show how to configure this action.

## Flutter version

Use specific version and channel:

Expand Down Expand Up @@ -63,7 +65,9 @@ steps:
- run: flutter --version
```

Build Android APK and app bundle:
## Build Target

Build **Android** APK and app bundle:

```yaml
steps:
Expand All @@ -77,7 +81,7 @@ steps:
- run: flutter build appbundle
```

Build for iOS (macOS only):
Build for **iOS** (macOS only):

```yaml
jobs:
Expand All @@ -93,7 +97,7 @@ jobs:
- run: flutter build ios --release --no-codesign
```

Build for the web:
Build for the **web**:

```yaml
steps:
Expand All @@ -106,7 +110,7 @@ steps:
- run: flutter build web
```

Build for Windows:
Build for **Windows**:

```yaml
jobs:
Expand All @@ -120,7 +124,7 @@ jobs:
- run: flutter build windows
```

Build for Linux desktop:
Build for **Linux** desktop:

```yaml
jobs:
Expand All @@ -137,7 +141,7 @@ jobs:
- run: flutter build linux
```

Build for macOS desktop:
Build for **macOS** desktop:

```yaml
jobs:
Expand All @@ -151,6 +155,8 @@ jobs:
- run: flutter build macos
```

## Caching

Integration with `actions/cache`:

```yaml
Expand All @@ -160,6 +166,7 @@ steps:
with:
channel: 'stable'
cache: true
# optional parameters follow
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path
pub-cache-key: 'flutter-pub:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache of dart pub get dependencies
Expand Down