From 6bce156401aa616381254a2b6270a8dd69531346 Mon Sep 17 00:00:00 2001 From: Henri Cook Date: Sun, 21 Jul 2024 16:17:00 +0100 Subject: [PATCH] Correct github actions --- .github/workflows/release.yml | 72 +++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 32 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bf51170..55e9909 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,13 +6,9 @@ on: - main jobs: - build: + build-linux: runs-on: ubuntu-latest - strategy: - matrix: - os: [macos-latest, windows-latest, ubuntu-latest] - steps: - name: Checkout repository uses: actions/checkout@v2 @@ -20,46 +16,58 @@ jobs: - name: Setup Flutter uses: subosito/flutter-action@v2 with: - flutter-version: 'stable' - - - name: Enable desktop platforms - run: | - flutter config --enable-macos-desktop - flutter config --enable-windows-desktop - flutter config --enable-linux-desktop + channel: stable + cache: true - name: Install dependencies run: flutter pub get - - name: Build for macOS - if: matrix.os == 'macos-latest' - run: flutter build macos --release + - run: | + sudo apt-get update -y + sudo apt-get install -y ninja-build libgtk-3-dev - - name: Build for Windows - if: matrix.os == 'windows-latest' - run: flutter build windows --release + - run: flutter pub get + - run: flutter build linux - - name: Build for Linux - if: matrix.os == 'ubuntu-latest' - run: flutter build linux --release + - name: Upload Linux build artifacts + uses: actions/upload-artifact@v4 + with: + name: linux-release + path: build/linux/release/ + build-macos: + runs-on: macos-latest + steps: + - name: Clone repository + uses: actions/checkout@v4 + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + cache: true + - run: flutter pub get + - run: flutter build macos - name: Upload macOS build artifacts - if: matrix.os == 'macos-latest' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: macos-release path: build/macos/Build/Products/Release/ - + build-windows: + runs-on: windows-latest + steps: + - name: Clone repository + uses: actions/checkout@v4 + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + cache: true + - run: flutter pub get + - run: flutter build windows - name: Upload Windows build artifacts - if: matrix.os == 'windows-latest' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: windows-release path: build/windows/runner/Release/ - - name: Upload Linux build artifacts - if: matrix.os == 'ubuntu-latest' - uses: actions/upload-artifact@v2 - with: - name: linux-release - path: build/linux/release/ +