Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .github/actions/pana/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,7 @@ runs:
yq eval '.dependencies.stream_chat = {"path": "../stream_chat"}' -i packages/stream_chat_persistence/pubspec.yaml

- name: Install Flutter
uses: subosito/flutter-action@v2
with:
cache: true
channel: stable
flutter-version: "3.x"
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
uses: ./.github/actions/setup-flutter

- name: Install Pana
working-directory: ${{ inputs.working_directory }}
Expand Down
20 changes: 17 additions & 3 deletions .github/actions/setup-flutter/action.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
name: 'Setup Flutter'
description: 'Install Flutter with dependency caching'
inputs:
flutter-version:
description: 'Flutter version to install. Empty selects the newest on the channel.'
required: false
default: '3.x'
channel:
description: 'Flutter release channel'
required: false
default: 'stable'
cache-sdk:
description: 'Cache the Flutter SDK. Turn off for jobs that run too rarely to hit it.'
required: false
default: 'true'
runs:
using: "composite"
steps:
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.x"
channel: stable
cache: true
flutter-version: ${{ inputs.flutter-version }}
channel: ${{ inputs.channel }}
cache: ${{ inputs.cache-sdk }}
pub-cache: 'true'
cache-key: "flutter-:os:-:channel:-:version:-:arch:"
pub-cache-key: "flutter-pub-:os:-${{ hashFiles('melos.yaml', '**/pubspec.yaml') }}"
11 changes: 8 additions & 3 deletions .github/workflows/beta_version_analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ jobs:
fetch-depth: 0

- name: "Install Flutter"
uses: subosito/flutter-action@v2
uses: ./.github/actions/setup-flutter
with:
channel: beta
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
# Must stay empty. Inheriting the action's 3.x default would hold this
# job on 3.x betas, so it would stop catching the next major early —
# which is the only thing it exists to do.
flutter-version: ''
Comment thread
xsahil03x marked this conversation as resolved.
# Weekly, and a new beta invalidates the key, so an SDK entry would
# almost never be restored before it expires.
cache-sdk: 'false'

- name: 📊 Analyze and test packages
uses: ./.github/actions/package_analysis
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/legacy_version_analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,9 @@ jobs:
fetch-depth: 0

- name: "Install Flutter"
uses: subosito/flutter-action@v2
uses: ./.github/actions/setup-flutter
with:
flutter-version: ${{ env.flutter_version }}
channel: stable
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}

- name: 📊 Analyze and test packages
uses: ./.github/actions/package_analysis
2 changes: 1 addition & 1 deletion .github/workflows/release_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: dart-lang/setup-dart@v1

- name: 🐦 Install Flutter
uses: subosito/flutter-action@v2
uses: ./.github/actions/setup-flutter

- name: 📦 Install Tools
run: flutter pub global activate melos
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/update_goldens.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ jobs:
uses: actions/checkout@v7

- name: 🐦 Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.x"
channel: stable
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
uses: ./.github/actions/setup-flutter

- name: 📦 Install Tools
run: flutter pub global activate melos
Expand Down Expand Up @@ -76,11 +72,7 @@ jobs:
uses: actions/checkout@v7

- name: 🐦 Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.x"
channel: stable
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
uses: ./.github/actions/setup-flutter

- name: 📦 Install Tools
run: flutter pub global activate melos
Expand Down
Loading