mirror of
https://github.com/subosito/flutter-action.git
synced 2024-08-16 10:19:50 +02:00
Structure Documentation
Adds sections: Flutter Version, Build Target, Cache Bold build target names to find them more easily
This commit is contained in:
parent
ab382cfb66
commit
d32931db2f
1 changed files with 14 additions and 7 deletions
21
README.md
21
README.md
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
Flutter environment for use in GitHub Actions. It works on Linux, Windows, and macOS.
|
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:
|
Use specific version and channel:
|
||||||
|
|
||||||
|
@ -63,7 +65,9 @@ steps:
|
||||||
- run: flutter --version
|
- run: flutter --version
|
||||||
```
|
```
|
||||||
|
|
||||||
Build Android APK and app bundle:
|
## Build Target
|
||||||
|
|
||||||
|
Build **Android** APK and app bundle:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
|
@ -77,7 +81,7 @@ steps:
|
||||||
- run: flutter build appbundle
|
- run: flutter build appbundle
|
||||||
```
|
```
|
||||||
|
|
||||||
Build for iOS (macOS only):
|
Build for **iOS** (macOS only):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -93,7 +97,7 @@ jobs:
|
||||||
- run: flutter build ios --release --no-codesign
|
- run: flutter build ios --release --no-codesign
|
||||||
```
|
```
|
||||||
|
|
||||||
Build for the web:
|
Build for the **web**:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
|
@ -106,7 +110,7 @@ steps:
|
||||||
- run: flutter build web
|
- run: flutter build web
|
||||||
```
|
```
|
||||||
|
|
||||||
Build for Windows:
|
Build for **Windows**:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -120,7 +124,7 @@ jobs:
|
||||||
- run: flutter build windows
|
- run: flutter build windows
|
||||||
```
|
```
|
||||||
|
|
||||||
Build for Linux desktop:
|
Build for **Linux** desktop:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -137,7 +141,7 @@ jobs:
|
||||||
- run: flutter build linux
|
- run: flutter build linux
|
||||||
```
|
```
|
||||||
|
|
||||||
Build for macOS desktop:
|
Build for **macOS** desktop:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -151,6 +155,8 @@ jobs:
|
||||||
- run: flutter build macos
|
- run: flutter build macos
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Caching
|
||||||
|
|
||||||
Integration with `actions/cache`:
|
Integration with `actions/cache`:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
@ -160,6 +166,7 @@ steps:
|
||||||
with:
|
with:
|
||||||
channel: 'stable'
|
channel: 'stable'
|
||||||
cache: true
|
cache: true
|
||||||
|
# optional parameters follow
|
||||||
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache
|
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
|
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
|
pub-cache-key: 'flutter-pub:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache of dart pub get dependencies
|
||||||
|
|
Loading…
Add table
Reference in a new issue