2019-08-16 19:33:37 +07:00
|
|
|
name: 'Flutter action'
|
2019-08-14 05:45:22 +07:00
|
|
|
description: 'Setup your runner with Flutter environment'
|
2019-08-13 17:11:30 +07:00
|
|
|
author: 'Alif Rachmawadi'
|
2022-01-06 07:40:25 +00:00
|
|
|
branding:
|
|
|
|
|
icon: 'maximize'
|
|
|
|
|
color: 'blue'
|
2019-08-13 17:11:30 +07:00
|
|
|
inputs:
|
2019-08-16 19:14:55 +07:00
|
|
|
flutter-version:
|
2019-08-13 17:11:30 +07:00
|
|
|
description: 'The Flutter version to make available on the path'
|
2019-08-16 18:30:45 +07:00
|
|
|
required: false
|
2022-04-19 17:08:46 +08:00
|
|
|
default: 'any'
|
2019-08-13 17:11:30 +07:00
|
|
|
channel:
|
|
|
|
|
description: 'The Flutter build release channel'
|
|
|
|
|
required: false
|
|
|
|
|
default: 'stable'
|
2022-01-08 14:55:41 +00:00
|
|
|
cache:
|
|
|
|
|
description: 'Cache the Flutter SDK'
|
|
|
|
|
required: false
|
2022-08-25 17:24:16 +07:00
|
|
|
default: false
|
2022-01-08 14:55:41 +00:00
|
|
|
cache-key:
|
|
|
|
|
description: 'Identifier for the Flutter SDK cache'
|
|
|
|
|
required: false
|
2022-07-26 12:08:35 +07:00
|
|
|
default: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
|
2022-01-13 10:10:55 +00:00
|
|
|
cache-path:
|
|
|
|
|
description: 'Flutter SDK cache path'
|
|
|
|
|
required: false
|
2022-07-26 12:08:35 +07:00
|
|
|
default: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:'
|
2022-04-19 17:08:46 +08:00
|
|
|
architecture:
|
|
|
|
|
description: 'The architecture of Flutter SDK executable (x64 or arm64)'
|
|
|
|
|
required: false
|
2022-04-29 09:52:26 +09:00
|
|
|
default: ${{ runner.arch }}
|
2019-08-13 17:11:30 +07:00
|
|
|
runs:
|
2022-01-06 07:40:25 +00:00
|
|
|
using: 'composite'
|
|
|
|
|
steps:
|
2022-07-26 12:08:35 +07:00
|
|
|
- id: flutter-action-cache-path-builder
|
2022-08-25 17:24:16 +07:00
|
|
|
run: echo "::set-output name=cache-path::$($GITHUB_ACTION_PATH/setup.sh -p cache-path -c '${{ inputs.cache-path }}' -n '${{ inputs.flutter-version }}' -a '${{ inputs.architecture }}' ${{ inputs.channel }})"
|
2022-07-26 12:08:35 +07:00
|
|
|
shell: bash
|
2022-07-24 19:19:31 +07:00
|
|
|
- if: ${{ inputs.cache == 'true' }}
|
|
|
|
|
id: flutter-action-cache-key-builder
|
2022-08-25 17:24:16 +07:00
|
|
|
run: echo "::set-output name=cache-key::$($GITHUB_ACTION_PATH/setup.sh -p cache-key -k ${{ inputs.cache-key }} -n '${{ inputs.flutter-version }}' -a '${{ inputs.architecture }}' ${{ inputs.channel }})"
|
2022-07-24 19:19:31 +07:00
|
|
|
shell: bash
|
2022-01-08 14:55:41 +00:00
|
|
|
- if: ${{ inputs.cache == 'true' }}
|
2022-04-27 12:24:59 +09:00
|
|
|
uses: actions/cache@v3
|
2022-01-08 14:55:41 +00:00
|
|
|
with:
|
2022-07-26 12:08:35 +07:00
|
|
|
path: ${{ steps.flutter-action-cache-path-builder.outputs.cache-path }}
|
2022-07-24 19:19:31 +07:00
|
|
|
key: ${{ steps.flutter-action-cache-key-builder.outputs.cache-key }}
|
2022-08-25 17:24:16 +07:00
|
|
|
- run: $GITHUB_ACTION_PATH/setup.sh -c '${{ steps.flutter-action-cache-path-builder.outputs.cache-path }}' -n '${{ inputs.flutter-version }}' -a '${{ inputs.architecture }}' ${{ inputs.channel }}
|
2022-01-06 07:40:25 +00:00
|
|
|
shell: bash
|