@@ -4,6 +4,7 @@ author: Alif Rachmawadi
4
4
branding :
5
5
icon : maximize
6
6
color : blue
7
+
7
8
inputs :
8
9
flutter-version :
9
10
description : The Flutter version to make available on the path
@@ -37,6 +38,7 @@ inputs:
37
38
description : The architecture of Flutter SDK executable (x64 or arm64)
38
39
required : false
39
40
default : " ${{ runner.arch }}"
41
+
40
42
outputs :
41
43
CACHE-KEY :
42
44
value : " ${{ steps.flutter-action.outputs.CACHE-KEY }}"
@@ -59,32 +61,51 @@ outputs:
59
61
PUB-CACHE-PATH :
60
62
value : " ${{ steps.flutter-action.outputs.PUB-CACHE-PATH }}"
61
63
description : Path to pub cache
64
+
62
65
runs :
63
66
using : composite
64
67
steps :
65
68
- name : Make setup script executable
66
69
run : chmod +x "$GITHUB_ACTION_PATH/setup.sh"
67
70
shell : bash
68
- - name : Print configuration
71
+
72
+ - name : Set action inputs
69
73
id : flutter-action
70
- run : $GITHUB_ACTION_PATH/setup.sh -p -c '${{ inputs.cache-path }}' -k '${{ inputs.cache-key }}' -d '${{ inputs.pub-cache-path }}' -l '${{ inputs.pub-cache-key }}' -n '${{ inputs.flutter-version }}' -a '${{ inputs.architecture }}' ${{ inputs.channel }}
71
74
shell : bash
75
+ run : |
76
+ $GITHUB_ACTION_PATH/setup.sh -p \
77
+ -c '${{ inputs.cache-path }}' \
78
+ -k '${{ inputs.cache-key }}' \
79
+ -d '${{ inputs.pub-cache-path }}' \
80
+ -l '${{ inputs.pub-cache-key }}' \
81
+ -n '${{ inputs.flutter-version }}' \
82
+ -a '${{ inputs.architecture }}' \
83
+ ${{ inputs.channel }}
84
+
72
85
- name : Cache Flutter
73
- if : ${{ inputs.cache == 'true' }}
74
86
uses : actions/cache@v4
87
+ if : ${{ inputs.cache == 'true' }}
75
88
with :
76
89
path : ${{ steps.flutter-action.outputs.CACHE-PATH }}
77
90
key : ${{ steps.flutter-action.outputs.CACHE-KEY }}
78
91
restore-keys : |
79
92
${{ steps.flutter-action.outputs.CACHE-KEY }}
93
+
80
94
- name : Cache pub dependencies
81
- if : ${{ inputs.cache == 'true' }}
82
95
uses : actions/cache@v4
96
+ if : ${{ inputs.cache == 'true' }}
83
97
with :
84
98
path : ${{ steps.flutter-action.outputs.PUB-CACHE-PATH }}
85
99
key : ${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}-${{ hashFiles('**/pubspec.lock') }}
86
100
restore-keys : |
87
101
${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}-${{ hashFiles('**/pubspec.lock') }}
88
102
${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}
89
- - run : $GITHUB_ACTION_PATH/setup.sh -c '${{ steps.flutter-action.outputs.CACHE-PATH }}' -n '${{ steps.flutter-action.outputs.VERSION }}' -a '${{ steps.flutter-action.outputs.ARCHITECTURE }}' ${{ steps.flutter-action.outputs.CHANNEL }}
103
+
104
+ - name : Run setup script
90
105
shell : bash
106
+ run : |
107
+ $GITHUB_ACTION_PATH/setup.sh \
108
+ -c '${{ steps.flutter-action.outputs.CACHE-PATH }}' \
109
+ -n '${{ steps.flutter-action.outputs.VERSION }}' \
110
+ -a '${{ steps.flutter-action.outputs.ARCHITECTURE }}' \
111
+ ${{ steps.flutter-action.outputs.CHANNEL }}
0 commit comments