From 040644b63018f8cef8f1c26613726afa5b43099e Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Mon, 18 Aug 2025 13:05:31 +0200 Subject: [PATCH] Updated workflow for licenses --- .github/workflows/flutter.yml | 44 +++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/.github/workflows/flutter.yml b/.github/workflows/flutter.yml index 58064f3..d614575 100644 --- a/.github/workflows/flutter.yml +++ b/.github/workflows/flutter.yml @@ -8,22 +8,43 @@ on: pull_request: jobs: - lint: - runs-on: macos-latest + generate_licenses: + if: github.event_name == 'push' && github.ref == 'refs/heads/develop + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Flutter + uses: subosito/flutter-action@v1.5.3 + with: + flutter-version: '3.32.1' + channel: "stable" + + - name: Get dependencies + run: flutter pub get + + - name: Generate oss_licenses.dart + run: flutter pub run flutter_oss_licenses:generate.dart -o lib/presentation/views/about/licenses/oss_licenses.dart + + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code - uses: actions/checkout@v4 - name: Set Up Flutter uses: subosito/flutter-action@v2 with: - flutter-version: '3.29.2' + flutter-version: '3.32.1' channel: 'stable' - name: Check Formatting run: flutter analyze format: - runs-on: macos-latest + runs-on: ubuntu-latest needs: lint if: ${{ failure() && needs.lint.result == 'failure' && github.event_name == 'push' && github.ref == 'refs/heads/develop'}} steps: @@ -32,7 +53,7 @@ jobs: - name: Set Up Flutter uses: subosito/flutter-action@v2 with: - flutter-version: '3.29.2' + flutter-version: '3.32.1' channel: 'stable' - name: Get & upgrade dependencies @@ -64,7 +85,7 @@ jobs: git push test: - runs-on: macos-latest + runs-on: ubuntu-latest if: always() needs: [lint, format] @@ -74,15 +95,18 @@ jobs: - name: Set Up Flutter uses: subosito/flutter-action@v2 with: - flutter-version: '3.29.2' + flutter-version: '3.32.1' channel: 'stable' + + - name: Get dependencies + run: flutter pub get - name: Run Tests run: flutter test build: - runs-on: macos-latest + runs-on: ubuntu-latest if: false # skips job needs: [lint, format, test] @@ -92,10 +116,10 @@ jobs: - name: Set Up Flutter uses: subosito/flutter-action@v2 with: - flutter-version: '3.29.2' + flutter-version: '3.32.1' channel: 'stable' - - name: Install dependencies + - name: Get dependencies run: flutter pub get - name: Analyze project source