mirror of
https://github.com/subosito/flutter-action.git
synced 2024-08-16 10:19:50 +02:00
split longer lines
This commit is contained in:
parent
cf12a39989
commit
49cd17165c
3 changed files with 28 additions and 7 deletions
2
.github/workflows/workflow.yaml
vendored
2
.github/workflows/workflow.yaml
vendored
|
@ -69,7 +69,7 @@ jobs:
|
|||
- uses: ./
|
||||
with:
|
||||
channel: stable
|
||||
flutter-version: "3.10.6"
|
||||
flutter-version: 3.10.6
|
||||
cache: true
|
||||
- run: dart --version
|
||||
shell: bash
|
||||
|
|
|
@ -57,7 +57,7 @@ steps:
|
|||
- name: Set up Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: "3.x"
|
||||
flutter-version: 3.x
|
||||
channel: any
|
||||
- run: flutter --version
|
||||
```
|
||||
|
|
31
action.yaml
31
action.yaml
|
@ -4,6 +4,7 @@ author: Alif Rachmawadi
|
|||
branding:
|
||||
icon: maximize
|
||||
color: blue
|
||||
|
||||
inputs:
|
||||
flutter-version:
|
||||
description: The Flutter version to make available on the path
|
||||
|
@ -37,6 +38,7 @@ inputs:
|
|||
description: The architecture of Flutter SDK executable (x64 or arm64)
|
||||
required: false
|
||||
default: "${{ runner.arch }}"
|
||||
|
||||
outputs:
|
||||
CACHE-KEY:
|
||||
value: "${{ steps.flutter-action.outputs.CACHE-KEY }}"
|
||||
|
@ -59,32 +61,51 @@ outputs:
|
|||
PUB-CACHE-PATH:
|
||||
value: "${{ steps.flutter-action.outputs.PUB-CACHE-PATH }}"
|
||||
description: Path to pub cache
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Make setup script executable
|
||||
run: chmod +x "$GITHUB_ACTION_PATH/setup.sh"
|
||||
shell: bash
|
||||
- name: Print configuration
|
||||
|
||||
- name: Set action inputs
|
||||
id: flutter-action
|
||||
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 }}
|
||||
shell: bash
|
||||
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 }}
|
||||
|
||||
- name: Cache Flutter
|
||||
if: ${{ inputs.cache == 'true' }}
|
||||
uses: actions/cache@v4
|
||||
if: ${{ inputs.cache == 'true' }}
|
||||
with:
|
||||
path: ${{ steps.flutter-action.outputs.CACHE-PATH }}
|
||||
key: ${{ steps.flutter-action.outputs.CACHE-KEY }}
|
||||
restore-keys: |
|
||||
${{ steps.flutter-action.outputs.CACHE-KEY }}
|
||||
|
||||
- name: Cache pub dependencies
|
||||
if: ${{ inputs.cache == 'true' }}
|
||||
uses: actions/cache@v4
|
||||
if: ${{ inputs.cache == 'true' }}
|
||||
with:
|
||||
path: ${{ steps.flutter-action.outputs.PUB-CACHE-PATH }}
|
||||
key: ${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}-${{ hashFiles('**/pubspec.lock') }}
|
||||
restore-keys: |
|
||||
${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}-${{ hashFiles('**/pubspec.lock') }}
|
||||
${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}
|
||||
- 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 }}
|
||||
|
||||
- name: Run setup script
|
||||
shell: bash
|
||||
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 }}
|
||||
|
|
Loading…
Reference in a new issue