Skip to content

Commit

Permalink
Correct github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Henri Cook committed Jul 21, 2024
1 parent 30d3c95 commit 8857fa4
Showing 1 changed file with 38 additions and 30 deletions.
68 changes: 38 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,60 +6,68 @@ 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

- 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@v2
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
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
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/

0 comments on commit 8857fa4

Please sign in to comment.