diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 0c65918..d356131 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -21,23 +21,32 @@ jobs: with: channel: master - - uses: actions/cache@v4 + - name: Generate Pub Hash + uses: https://gitea.com/actions/go-hashfiles@v0.0.1 + id: pub-hash with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ gitea.sha }} + patterns: pubspec.lock + + - name: Cache Pub Dependencies + uses: https://gitea.com + with: + path: | + ~/.pub-cache + key: ${{ runner.os }}-pub-${{ steps.pub-hash.outputs.hash }} restore-keys: | - ${{ runner.os }}-buildx- + ${{ runner.os }}-pub- - name: Install Framework Dependencies run: | sudo apt-get update -y - sudo apt install -y ninja-build cmake clang libgtk-3-dev + sudo apt install -y ninja-build cmake clang libgtk-3-dev - name: Install Flutter uses: subosito/flutter-action@v2 with: channel: master flutter-version: 3.38.9 + cache: true - name: Check Flutter Installation run: flutter doctor -v @@ -65,11 +74,11 @@ jobs: - name: Save Artifacts uses: actions/upload-artifact@v3 with: - name: Prod-${{ github.ref_type == 'tag' && github.ref_name || 'master' }}-x86_64.AppImage + name: Prod-${{ github.ref_type == 'v*' && github.ref_name || 'master' }}-x86_64.AppImage path: Prod-latest-x86_64.AppImage - name: Create New Release uses: akkuman/gitea-release-action@v1 with: files: Prod-latest-x86_64.AppImage - prerelease: ${{ github.ref_type == 'tag' }} + prerelease: ${{ github.ref_type != 'v*' }}