diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 21ea1af..4c552c6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -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 @@ -36,5 +36,5 @@ jobs: uses: ./ with: path: test/.fvmrc - setup-flutter: true + setup: true - run: flutter --version diff --git a/README.md b/README.md index 851589e..e574f8d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/action.yaml b/action.yaml index fcb8d22..6e83dcd 100644 --- a/action.yaml +++ b/action.yaml @@ -9,7 +9,7 @@ inputs: description: 'Flavor to use' required: false default: '' - setup-flutter: + setup: description: 'Setup Flutter (default: false)' required: false default: 'false' @@ -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' \ No newline at end of file + color: 'blue'