Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44ac965b96 | ||
|
|
980391a6c5 |
10
.github/workflows/workflow.yaml
vendored
10
.github/workflows/workflow.yaml
vendored
@@ -28,6 +28,7 @@ jobs:
|
||||
operating-system:
|
||||
[ubuntu-latest, windows-latest, macos-latest, macos-13, macos-14]
|
||||
channel: [stable, beta, master]
|
||||
dry-run: [true, false]
|
||||
include:
|
||||
- operating-system: ubuntu-latest
|
||||
channel: main
|
||||
@@ -39,6 +40,7 @@ jobs:
|
||||
uses: ./
|
||||
with:
|
||||
channel: ${{ matrix.channel }}
|
||||
dry-run: ${{ matrix.dry-run }}
|
||||
- name: Echo outputs
|
||||
run: |
|
||||
echo RUNNER-OS=${{ runner.os }}
|
||||
@@ -51,8 +53,16 @@ jobs:
|
||||
echo ARCHITECTURE=${{ steps.flutter-action.outputs.ARCHITECTURE }}
|
||||
shell: bash
|
||||
- run: dart --version
|
||||
if: ${{ matrix.dry-run != 'true' }}
|
||||
shell: bash
|
||||
- run: flutter --version
|
||||
if: ${{ matrix.dry-run != 'true' }}
|
||||
shell: bash
|
||||
- run: "! dart --version"
|
||||
if: ${{ matrix.dry-run == 'true' }}
|
||||
shell: bash
|
||||
- run: "! flutter --version"
|
||||
if: ${{ matrix.dry-run == 'true' }}
|
||||
shell: bash
|
||||
|
||||
test_cache:
|
||||
|
||||
33
README.md
33
README.md
@@ -5,8 +5,6 @@ macOS.
|
||||
|
||||
The following sections show how to configure this action.
|
||||
|
||||
Maintainers: [Alif Rachmawadi] (original creator), [Bartek Pacia]
|
||||
|
||||
## Specifying Flutter version
|
||||
|
||||
### Use specific version and channel
|
||||
@@ -62,7 +60,7 @@ steps:
|
||||
|
||||
> [!WARNING]
|
||||
>
|
||||
> Using `flutter-version-file` requires [`yq`][https://github.com/mikefarah/yq],
|
||||
> Using `flutter-version-file` requires [`yq`](https://github.com/mikefarah/yq),
|
||||
> which is not pre-installed in `windows` images. Install it yourself.
|
||||
|
||||
### Use latest release for particular channel
|
||||
@@ -284,5 +282,34 @@ steps:
|
||||
echo PUB-CACHE-KEY=${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}
|
||||
```
|
||||
|
||||
If you don't need to install Flutter and just want the outputs, you can use the
|
||||
`dry-run` option:
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- name: Clone repository
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
id: flutter-action
|
||||
with:
|
||||
channel: stable
|
||||
dry-run: true
|
||||
- run: |
|
||||
echo CACHE-PATH=${{ steps.flutter-action.outputs.CACHE-PATH }}
|
||||
echo CACHE-KEY=${{ steps.flutter-action.outputs.CACHE-KEY }}
|
||||
echo CHANNEL=${{ steps.flutter-action.outputs.CHANNEL }}
|
||||
echo VERSION=${{ steps.flutter-action.outputs.VERSION }}
|
||||
echo ARCHITECTURE=${{ steps.flutter-action.outputs.ARCHITECTURE }}
|
||||
echo PUB-CACHE-PATH=${{ steps.flutter-action.outputs.PUB-CACHE-PATH }}
|
||||
echo PUB-CACHE-KEY=${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}
|
||||
shell: bash
|
||||
```
|
||||
|
||||
## Maintainers
|
||||
|
||||
- [Alif Rachmawadi] (original creator)
|
||||
- [Bartek Pacia]
|
||||
|
||||
[Alif Rachmawadi]: https://github.com/subosito
|
||||
[Bartek Pacia]: https://github.com/bartekpacia
|
||||
|
||||
@@ -42,6 +42,10 @@ inputs:
|
||||
description: Flutter pub cache path
|
||||
required: false
|
||||
default: default
|
||||
dry-run:
|
||||
description: If true, get outputs but do not install Flutter
|
||||
required: false
|
||||
default: "false"
|
||||
|
||||
outputs:
|
||||
CHANNEL:
|
||||
@@ -108,6 +112,7 @@ runs:
|
||||
|
||||
- name: Run setup script
|
||||
shell: bash
|
||||
if: ${{ inputs.dry-run != 'true' }}
|
||||
run: |
|
||||
$GITHUB_ACTION_PATH/setup.sh \
|
||||
-n '${{ steps.flutter-action.outputs.VERSION }}' \
|
||||
|
||||
Reference in New Issue
Block a user