From 8a397a68ff75e8dfc5fbc1e264c15d789258a13f Mon Sep 17 00:00:00 2001 From: Jonathan <57756132+jdk-21@users.noreply.github.com> Date: Thu, 14 Dec 2023 12:25:35 +0100 Subject: [PATCH] Update deploy.yml --- .github/workflows/deploy.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2dfcb7d..d1df994 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -41,7 +41,6 @@ jobs: cache: gradle - uses: subosito/flutter-action@v2 with: - flutter-version: "3.0.0" channel: 'stable' cache: true @@ -101,11 +100,13 @@ jobs: with: distribution: 'zulu' java-version: '12.x' + cache: gradle - name: Setup Flutter uses: subosito/flutter-action@v2 with: channel: 'stable' + cache: true - name: Run Pub get run: flutter pub get @@ -149,11 +150,19 @@ jobs: with: distribution: 'zulu' java-version: '12.x' + cache: gradle + + - name: Setup build tools + run: | + sudo apt-get update -y + sudo apt-get install -y ninja-build libgtk-3-dev clang + flutter doctor - name: Setup Flutter uses: subosito/flutter-action@v2 with: channel: 'stable' + cache: true - name: Run Pub get run: flutter pub get @@ -180,7 +189,7 @@ jobs: with: name: gitversion - name: Create new file without newline char from version.txt - run: tr -d '\n' < version.txt > version1.txt + run: for /f "delims=" %%i in (version.txt) do echo|set /p=%%i > version1.txt - name: Read version id: version uses: juliangruber/read-file-action@v1 @@ -194,11 +203,13 @@ jobs: with: distribution: 'zulu' java-version: '12.x' + cache: gradle - name: Setup Flutter uses: subosito/flutter-action@v2 with: channel: 'stable' + cache: true - name: Run Pub get run: flutter pub get @@ -232,18 +243,20 @@ jobs: with: path: version1.txt - name: Update version in YAML - run: sed -i 's/99.99.99+99/${{ steps.version.outputs.content }}+${{ github.run_number }}/g' pubspec.yaml + run: sed -i '' 's/99.99.99+99/${{ steps.version.outputs.content }}+${{ github.run_number }}/g' pubspec.yaml - name: Setup Java uses: actions/setup-java@v3 with: distribution: 'zulu' java-version: '12.x' + cache: gradle - name: Setup Flutter uses: subosito/flutter-action@v2 with: channel: 'stable' + cache: true - name: Run Pub get run: flutter pub get @@ -305,4 +318,4 @@ jobs: jellyflix-macos/*.app token: ${{ secrets.API_TOKEN_GITHUB }} tag: ${{ steps.version.outputs.content }} - commit: ${{ github.sha }} \ No newline at end of file + commit: ${{ github.sha }}