From d53461a28a1127837eb77df5a9c3336c1b03d283 Mon Sep 17 00:00:00 2001 From: Donatas Puidokas <104410044+donpui@users.noreply.github.com> Date: Wed, 25 Jan 2023 12:55:09 +0200 Subject: [PATCH] Fix stable flutter version (#227) * Fix stable flutter version * Fix CI yaml error * Fix CI yaml error * Add flutter changes for all jobs * Add global env variable for flutter * Fix variable --- .github/workflows/build.yml | 45 ++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 22231ca1..0aa96f43 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,11 @@ on: branches: - "main" +# https://docs.flutter.dev/development/tools/sdk/releases?tab=linux +env: + FLUTTER_VERSION: "3.3.10" + FLUTTER_BRANCH: "stable" + jobs: android: runs-on: ubuntu-latest @@ -27,7 +32,13 @@ jobs: if: ${{ github.ref_type != 'tag' }} - name: "Setup flutter" - uses: "subosito/flutter-action@v2.4.0" + uses: subosito/flutter-action@v2 + with: + # set fixed stable version, to avoid surprises, when flutter upgrades + flutter-version: ${{ env.FLUTTER_VERSION }} + channel: ${{ env.FLUTTER_BRANCH }} + + - run: flutter --version - name: "Fetch flutter dependencies" run: "flutter pub get" @@ -78,7 +89,13 @@ jobs: if: ${{ github.ref_type != 'tag' }} - name: "Setup flutter" - uses: "subosito/flutter-action@v2.4.0" + uses: subosito/flutter-action@v2 + with: + # set fixed stable version, to avoid surprises, when flutter upgrades + flutter-version: ${{ env.FLUTTER_VERSION }} + channel: ${{ env.FLUTTER_BRANCH }} + + - run: flutter --version - name: "Fetch flutter dependencies" run: "flutter pub get" @@ -156,7 +173,13 @@ jobs: if: ${{ github.ref_type != 'tag' }} - name: "Setup flutter" - uses: "subosito/flutter-action@v2.4.0" + uses: subosito/flutter-action@v2 + with: + # set fixed stable version, to avoid surprises, when flutter upgrades + flutter-version: ${{ env.FLUTTER_VERSION }} + channel: ${{ env.FLUTTER_BRANCH }} + + - run: flutter --version - name: "Fetch flutter dependencies" run: "flutter pub get" @@ -214,7 +237,13 @@ jobs: if: ${{ github.ref_type != 'tag' }} - name: "Setup flutter" - uses: "subosito/flutter-action@v2.4.0" + uses: subosito/flutter-action@v2 + with: + # set fixed stable version, to avoid surprises, when flutter upgrades + flutter-version: ${{ env.FLUTTER_VERSION }} + channel: ${{ env.FLUTTER_BRANCH }} + + - run: flutter --version - name: "Fetch flutter dependencies" run: "flutter pub get" @@ -250,7 +279,13 @@ jobs: if: ${{ github.ref_type != 'tag' }} - name: "Setup flutter" - uses: "subosito/flutter-action@v2.4.0" + uses: subosito/flutter-action@v2 + with: + # set fixed stable version, to avoid surprises, when flutter upgrades + flutter-version: ${{ env.FLUTTER_VERSION }} + channel: ${{ env.FLUTTER_BRANCH }} + + - run: flutter --version - name: "Fetch flutter dependencies" run: "flutter pub get"