diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index c40263f8..ac002688 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -76,6 +76,27 @@ jobs: - run: flutter --version shell: bash + test_version_file: + runs-on: ${{ matrix.operating-system }} + + strategy: + matrix: + operating-system: [ubuntu-latest] + + steps: + - name: Clone repository + uses: actions/checkout@v4 + - uses: ./ + with: + channel: stable + flutter-version-file: test/pubspec.yaml + - name: Verify Dart version + run: dart --version | grep '2.18.6' + shell: bash + - name: Verify Flutter version + run: flutter --version | grep '3.3.10' + shell: bash + test_print_output: runs-on: macos-latest diff --git a/action.yaml b/action.yaml index b5c90616..1b2144c2 100644 --- a/action.yaml +++ b/action.yaml @@ -13,7 +13,7 @@ inputs: flutter-version: description: The Flutter version to make available on the path required: false - default: any + default: "" flutter-version-file: description: The pubspec.yaml file with exact Flutter version defined required: false diff --git a/setup.sh b/setup.sh index e3a7491e..7b0d104b 100755 --- a/setup.sh +++ b/setup.sh @@ -103,7 +103,7 @@ done [ -z "$ARCH" ] && ARCH="$ARCH_NAME" if [ -n "$VERSION_FILE" ]; then - if [ -n "$VERSION" ] || [ "$VERSION" != "any" ] ; then + if [ -n "$VERSION" ]; then echo "Cannot specify both a version and a version file" exit 1 fi