Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
subosito committed Jan 6, 2022
1 parent 2f01469 commit 4686a99
Showing 1 changed file with 22 additions and 48 deletions.
70 changes: 22 additions & 48 deletions README.md
Expand Up @@ -4,69 +4,51 @@ This action sets up a flutter environment for use in actions. It works on Linux,

# Usage

Use specific version and channel:

```yaml
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
flutter-version: '2.0.5'
- run: flutter pub get
- run: flutter test
flutter-version: '2.8.0'
channel: 'stable'
- run: flutter --version
```

Use latest release for particular channel:

```yaml
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
channel: 'stable' # or: 'beta', 'dev' or 'master'
- run: flutter pub get
- run: flutter test
- run: flutter build apk
- run: flutter --version
```

Use latest release for particular version and/or channel:

```yaml
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
flutter-version: '1.22.x' # or, you can use 1.22
channel: 'dev'
- run: flutter pub get
- run: flutter test
- run: flutter --version
```

Use particular version on any channel:

```yaml
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
flutter-version: '2.x'
channel: 'any'
- run: flutter pub get
- run: flutter test
- run: flutter --version
```

Build Android APK and app bundle:
Expand All @@ -80,31 +62,26 @@ steps:
java-version: '11'
- uses: subosito/flutter-action@v2
with:
flutter-version: '2.0.5'
flutter-version: '2.5.3'
- run: flutter pub get
- run: flutter test
- run: flutter build apk
- run: flutter build appbundle
```

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

```yaml
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
flutter-version: '2.0.5'
flutter-version: '2.5.3'
- run: flutter pub get
- run: flutter test
- run: flutter build apk
- run: flutter build ios --release --no-codesign
```

Expand All @@ -115,7 +92,7 @@ steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
flutter-version: '2.0.5'
flutter-version: '2.5.3'
- run: flutter pub get
- run: flutter test
- run: flutter build web
Expand All @@ -124,15 +101,16 @@ steps:
Build for Windows:

```yaml
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
channel: beta
- run: flutter config --enable-windows-desktop
- run: flutter build windows
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
channel: beta
- run: flutter config --enable-windows-desktop
- run: flutter build windows
```

Matrix Testing:
Expand All @@ -147,10 +125,6 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
flutter-version: '1.20.2'
Expand Down

0 comments on commit 4686a99

Please sign in to comment.