Skip to content

Commit

Permalink
Update README (#266)
Browse files Browse the repository at this point in the history
* doc: Update README

* fix: Specify the dev channel version
  • Loading branch information
koji-1009 committed Feb 13, 2024
1 parent 8440825 commit 62f096c
Showing 1 changed file with 17 additions and 27 deletions.
44 changes: 17 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Use specific version and channel:

```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.7.7'
flutter-version: '3.16.9'
channel: 'stable'
- run: flutter --version
```
Expand All @@ -20,7 +20,7 @@ Use latest release for particular channel:

```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable' # or: 'beta', 'dev', 'master' (or 'main')
Expand All @@ -31,7 +31,7 @@ Use latest release for particular version and/or channel:

```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: '1.22.x'
Expand All @@ -43,10 +43,10 @@ Use particular version on any channel:

```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: '2.x'
flutter-version: '3.x'
channel: 'any'
- run: flutter --version
```
Expand All @@ -55,7 +55,7 @@ Use particular git reference on master channel:

```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: '5b12b74' # tag, commit or branch
Expand All @@ -67,14 +67,10 @@ Build Android APK and app bundle:

```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.7.7'
flutter-version: '3.16.9'
- run: flutter pub get
- run: flutter test
- run: flutter build apk
Expand All @@ -88,11 +84,10 @@ jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
architecture: x64
- run: flutter pub get
- run: flutter test
- run: flutter build ios --release --no-codesign
Expand All @@ -102,7 +97,7 @@ Build for the web:

```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
Expand All @@ -118,11 +113,10 @@ jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'beta'
- run: flutter config --enable-windows-desktop
channel: 'stable'
- run: flutter build windows
```

Expand All @@ -133,14 +127,13 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
- run: flutter config --enable-linux-desktop
- run: flutter build linux
```

Expand All @@ -151,20 +144,18 @@ jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
architecture: x64
- run: flutter config --enable-macos-desktop
- run: flutter build macos
```

Integration with `actions/cache`:

```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
Expand All @@ -173,7 +164,6 @@ steps:
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-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path
architecture: x64 # optional, x64 or arm64
- run: flutter --version
```

Expand All @@ -190,7 +180,7 @@ Use outputs from `flutter-action`:

```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- id: flutter-action
uses: subosito/flutter-action@v2
with:
Expand Down

0 comments on commit 62f096c

Please sign in to comment.