Skip to content

Commit

Permalink
Update readme and improve input name
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhnroyal committed Aug 20, 2024
1 parent 73a9878 commit 5912cab
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
- run: echo ${{ env.FLUTTER_VERSION }}
- run: echo ${{ env.FLUTTER_CHANNEL }}

test-setup:
name: Setup
test-setup-flutter:
name: Setup Flutter
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -36,5 +36,5 @@ jobs:
uses: ./
with:
path: test/.fvmrc
setup-flutter: true
setup: true
- run: flutter --version
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,22 @@ can then be used to configure the [flutter-action](https://github.com/subosito/f

## Usage

All the sample options below can be combined with each other.

### Basic usage

The configuration will parse the FVM configuration and use subosito/flutter-action to install the configured Flutter version.

```yaml
steps:
- uses: actions/checkout@v4
- uses: kuhnroyal/flutter-fvm-config-action@v2
with:
# The setup flag will default to true in the next major version (v3)
setup: true
```
### Basic usage with manual configuration
```yaml
steps:
- uses: actions/checkout@v4
Expand Down
12 changes: 7 additions & 5 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
description: 'Flavor to use'
required: false
default: ''
setup-flutter:
setup:
description: 'Setup Flutter (default: false)'
required: false
default: 'false'
Expand All @@ -23,17 +23,19 @@ outputs:
runs:
using: 'composite'
steps:
- uses: ./config-action
- name: Parse configuration
uses: ./config-action
id: config-action
with:
path: ${{ inputs.path }}
flavor: ${{ inputs.flavor }}
- uses: subosito/flutter-action@v2
if: inputs.setup-flutter == 'true'
- name: Setup Flutter
uses: subosito/flutter-action@v2
if: inputs.setup == 'true'
with:
cache: true
flutter-version: ${{ steps.config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.config-action.outputs.FLUTTER_CHANNEL }}
branding:
icon: 'maximize'
color: 'blue'
color: 'blue'

0 comments on commit 5912cab

Please sign in to comment.