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
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@ jobs:
forbidden: "unknown"
skip_packages: "very_good_analysis"

verify-license-check-flutter:
uses: ./.github/workflows/license_check.yml
with:
working_directory: examples/flutter_package
flutter_channel: stable
flutter_version: "3.41.x"
dependency_type: "direct-dev"
allowed: ""
forbidden: "unknown"
skip_packages: "very_good_analysis"

build:
needs:
[
Expand All @@ -65,6 +76,7 @@ jobs:
verify-semantic-pull-request,
verify-spell-check,
verify-license-check,
verify-license-check-flutter,
]

runs-on: ubuntu-latest
Expand Down
23 changes: 22 additions & 1 deletion .github/workflows/license_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ on:
required: false
type: string
default: "stable"
flutter_channel:
required: false
type: string
default: "stable"
flutter_version:
required: false
type: string
default: ""
allowed:
required: false
type: string
Expand Down Expand Up @@ -47,15 +55,28 @@ jobs:

runs-on: ${{inputs.runs_on}}

env:
is_flutter: ${{ inputs.flutter_version != '' }}

steps:
- name: 📚 Git Checkout
uses: actions/checkout@v6

- name: 🎯 Setup Dart
if: env.is_flutter == 'false'
uses: dart-lang/setup-dart@v1.7.2
with:
sdk: ${{inputs.dart_sdk}}

- name: 🐦 Setup Flutter
if: env.is_flutter == 'true'
uses: subosito/flutter-action@v2
with:
cache: true
channel: ${{inputs.flutter_channel}}
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
flutter-version: ${{inputs.flutter_version}}

- name: 🤫 Set SSH Key
env:
ssh_key: ${{secrets.ssh_key}}
Expand All @@ -65,7 +86,7 @@ jobs:
ssh-private-key: ${{secrets.ssh_key}}

- name: 📦 Install Dependencies
run: dart pub get --no-example
run: ${{ env.is_flutter == 'true' && 'flutter' || 'dart' }} pub get --no-example

- name: 👨‍⚖️ Check licenses
run: |
Expand Down
16 changes: 14 additions & 2 deletions site/docs/workflows/license_check.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The License Check functionality is powered by [Very Good CLI's license checker](

The License Check workflow consists of the following steps:

1. Setup Dart
1. Setup Dart or Flutter
2. Set SSH Key (if provided)
3. Install project dependencies
4. Check licenses
Expand All @@ -35,10 +35,22 @@ The License Check workflow consists of the following steps:

### `dart_sdk`

**Optional** Which Dart SDK version to use. It can be a version (e.g. `3.5.0`) or a channel (e.g. `stable`):
**Optional** Which Dart SDK version to use. It can be a version (e.g. `3.5.0`) or a channel (e.g. `stable`). Ignored when `flutter_version` is set.

**Default** `"stable"`

### `flutter_channel`

**Optional** The Flutter channel to use (e.g. `stable`, `beta`). Only used when `flutter_version` is set.

**Default** `"stable"`

### `flutter_version`

**Optional** Which Flutter SDK version to use. When set, Flutter is used instead of Dart to install dependencies. It can be a version (e.g. `3.24.0`) or a version constraint (e.g. `3.24.x`).

**Default** `""`

### `allowed`

**Optional** Only allow the use of certain licenses. The expected format is a comma-separated list.
Expand Down