Skip to content

Commit 79aa2c8

Browse files
committed
check if java and flutter exist
1 parent 3722791 commit 79aa2c8

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

action.yml

+17-3
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,27 @@ inputs:
1717
runs:
1818
using: "composite"
1919
steps:
20-
- uses: actions/setup-java@v3
20+
- name: Check java found
21+
run: which java
22+
id: check_java
23+
shell: bash
24+
25+
- name: Install java
26+
if: ${{ !contains(steps.check_java.outputs, 'not found')}}
27+
uses: actions/setup-java@v3
2128
with:
2229
distribution: "zulu"
2330
java-version: "17.x"
2431
cache: "gradle"
2532

26-
- uses: subosito/flutter-action@v2
33+
- name: Check flutter found
34+
run: which flutter
35+
id: check_flutter
36+
shell: bash
37+
38+
- name: Setup flutter
39+
if: ${{ !contains(steps.check_flutter.outputs, 'not found')}}
40+
uses: subosito/flutter-action@v2
2741
with:
2842
channel: "stable"
2943
cache: true
@@ -44,7 +58,7 @@ runs:
4458
RELEASE_KEY_PASSWORD: ${{ inputs.release-key-password }}
4559
working-directory: ${{ inputs.working-directory }}/android
4660

47-
- name: build
61+
- name: Build
4862
run: ${{ inputs.build-cmd }}
4963
shell: bash
5064
working-directory: ${{ inputs.working-directory }}

0 commit comments

Comments
 (0)