Bump actions/setup-java from 5 to 5.6.0 in the github-actions group #228
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+*" | |
| branches: [develop, main] | |
| paths: | |
| - "flutter_cache_manager/**" | |
| - ".github/workflows/build.yaml" | |
| pull_request: | |
| branches: [develop, main] | |
| paths: | |
| - "flutter_cache_manager/**" | |
| - ".github/workflows/build.yaml" | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| FLUTTER_VERSION: "3.44.4" | |
| jobs: | |
| quality: | |
| name: Format, Analyze & Test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| defaults: | |
| run: | |
| working-directory: ./flutter_cache_manager | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: "stable" | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| cache: true | |
| - name: Download dependencies | |
| run: flutter pub get | |
| - name: Run Dart Format | |
| run: dart format --set-exit-if-changed . | |
| - name: Run Flutter Analyzer | |
| run: flutter analyze | |
| - name: Run unit tests | |
| run: flutter test --coverage | |
| build_android: | |
| name: Build Android App | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| defaults: | |
| run: | |
| working-directory: ./flutter_cache_manager | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-java@v5.6.0 | |
| with: | |
| distribution: "zulu" | |
| java-version: "17" | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: "stable" | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| cache: true | |
| - name: Download dependencies | |
| run: flutter pub get | |
| - name: Run Android build | |
| run: flutter build apk --release | |
| working-directory: ./flutter_cache_manager/example | |
| build_ios: | |
| name: Build iOS App | |
| runs-on: macos-latest | |
| timeout-minutes: 60 | |
| defaults: | |
| run: | |
| working-directory: ./flutter_cache_manager | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: "stable" | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| cache: true | |
| - name: Download dependencies | |
| run: flutter pub get | |
| - name: Run iOS build | |
| run: flutter build ios --release --no-codesign | |
| working-directory: ./flutter_cache_manager/example | |
| build_macOS: | |
| name: Build macOS App | |
| runs-on: macos-latest | |
| timeout-minutes: 60 | |
| defaults: | |
| run: | |
| working-directory: ./flutter_cache_manager | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: "stable" | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| cache: true | |
| - name: Download dependencies | |
| run: flutter pub get | |
| - name: Run macOS build | |
| run: flutter build macos --release | |
| working-directory: ./flutter_cache_manager/example | |
| build_windows: | |
| name: Build Windows App | |
| runs-on: windows-latest | |
| timeout-minutes: 45 | |
| defaults: | |
| run: | |
| working-directory: ./flutter_cache_manager | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: "stable" | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| cache: true | |
| - name: Download dependencies | |
| run: flutter pub get | |
| - name: Run Windows build | |
| run: flutter build windows --release | |
| working-directory: ./flutter_cache_manager/example | |
| build_linux: | |
| name: Build Linux App | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| defaults: | |
| run: | |
| working-directory: ./flutter_cache_manager | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install Linux build dependencies | |
| run: | | |
| sudo apt-get update -y | |
| sudo apt-get install -y ninja-build libgtk-3-dev | |
| working-directory: . | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: "stable" | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| cache: true | |
| - name: Download dependencies | |
| run: flutter pub get | |
| - name: Run Linux build | |
| run: flutter build linux --release | |
| working-directory: ./flutter_cache_manager/example | |
| build_web: | |
| name: Build Web App | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| defaults: | |
| run: | |
| working-directory: ./flutter_cache_manager | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: "stable" | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| cache: true | |
| - name: Download dependencies | |
| run: flutter pub get | |
| - name: Run Web build | |
| run: flutter build web --release | |
| working-directory: ./flutter_cache_manager/example | |
| publish_cache_manager: | |
| if: ${{ github.ref_type == 'tag' }} | |
| name: Publish CacheManager | |
| permissions: | |
| id-token: write | |
| contents: read | |
| needs: | |
| [ | |
| quality, | |
| build_android, | |
| build_ios, | |
| build_macOS, | |
| build_windows, | |
| build_linux, | |
| build_web, | |
| ] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| defaults: | |
| run: | |
| working-directory: ./flutter_cache_manager | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up Dart | |
| uses: dart-lang/setup-dart@v1 | |
| - name: Publish package | |
| run: dart pub publish -v -f |