1
0
Fork 0
mirror of https://github.com/subosito/flutter-action.git synced 2024-08-16 10:19:50 +02:00

Update README (#266)

* doc: Update README

* fix: Specify the dev channel version
This commit is contained in:
Koji Wakamiya 2024-02-13 09:52:27 +09:00 committed by GitHub
parent 844082558d
commit 62f096cacd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,10 +8,10 @@ Use specific version and channel:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
flutter-version: '3.7.7' flutter-version: '3.16.9'
channel: 'stable' channel: 'stable'
- run: flutter --version - run: flutter --version
``` ```
@ -20,7 +20,7 @@ Use latest release for particular channel:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
channel: 'stable' # or: 'beta', 'dev', 'master' (or 'main') channel: 'stable' # or: 'beta', 'dev', 'master' (or 'main')
@ -31,7 +31,7 @@ Use latest release for particular version and/or channel:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
flutter-version: '1.22.x' flutter-version: '1.22.x'
@ -43,10 +43,10 @@ Use particular version on any channel:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
flutter-version: '2.x' flutter-version: '3.x'
channel: 'any' channel: 'any'
- run: flutter --version - run: flutter --version
``` ```
@ -55,7 +55,7 @@ Use particular git reference on master channel:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
flutter-version: '5b12b74' # tag, commit or branch flutter-version: '5b12b74' # tag, commit or branch
@ -67,14 +67,10 @@ Build Android APK and app bundle:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
flutter-version: '3.7.7' flutter-version: '3.16.9'
- run: flutter pub get - run: flutter pub get
- run: flutter test - run: flutter test
- run: flutter build apk - run: flutter build apk
@ -88,11 +84,10 @@ jobs:
build: build:
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
channel: 'stable' channel: 'stable'
architecture: x64
- run: flutter pub get - run: flutter pub get
- run: flutter test - run: flutter test
- run: flutter build ios --release --no-codesign - run: flutter build ios --release --no-codesign
@ -102,7 +97,7 @@ Build for the web:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
channel: 'stable' channel: 'stable'
@ -118,11 +113,10 @@ jobs:
build: build:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
channel: 'beta' channel: 'stable'
- run: flutter config --enable-windows-desktop
- run: flutter build windows - run: flutter build windows
``` ```
@ -133,14 +127,13 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
channel: 'stable' channel: 'stable'
- run: | - run: |
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev sudo apt-get install -y ninja-build libgtk-3-dev
- run: flutter config --enable-linux-desktop
- run: flutter build linux - run: flutter build linux
``` ```
@ -151,12 +144,10 @@ jobs:
build: build:
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
channel: 'stable' channel: 'stable'
architecture: x64
- run: flutter config --enable-macos-desktop
- run: flutter build macos - run: flutter build macos
``` ```
@ -164,7 +155,7 @@ Integration with `actions/cache`:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: subosito/flutter-action@v2 - uses: subosito/flutter-action@v2
with: with:
channel: 'stable' channel: 'stable'
@ -173,7 +164,6 @@ steps:
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
pub-cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path 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 - run: flutter --version
``` ```
@ -190,7 +180,7 @@ Use outputs from `flutter-action`:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- id: flutter-action - id: flutter-action
uses: subosito/flutter-action@v2 uses: subosito/flutter-action@v2
with: with: