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

Update README #266

Merged
merged 3 commits into from
Feb 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
46 changes: 18 additions & 28 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,10 +31,10 @@ 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'
subosito marked this conversation as resolved.
Show resolved Hide resolved
flutter-version: '3.16.x'
channel: 'dev'
- run: flutter --version
```
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,27 +144,24 @@ 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'
cache: true
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
architecture: x64 # optional, x64 or arm64
- run: flutter --version
```

Expand All @@ -188,7 +178,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