Skip to content

Add GitHub Actions workflow for multi-platform builds #1

Add GitHub Actions workflow for multi-platform builds

Add GitHub Actions workflow for multi-platform builds #1

name: Build All Platforms Parallel
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
# 1. Android Job
build-android:
name: Build Android
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '17'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- run: flutter pub get
- run: flutter build apk --release
- uses: actions/upload-artifact@v5
with:
name: android-apk
path: build/app/outputs/flutter-apk/app-release.apk
# 2. iOS Job (No Codesign)
build-ios:
name: Build iOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- run: flutter pub get
- run: flutter build ios --release --no-codesign
# 3. MacOS Job
build-macos:
name: Build macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- run: flutter config --enable-macos-desktop
- run: flutter pub get
- run: flutter build macos --release
- uses: actions/upload-artifact@v5
with:
name: macos-app
path: build/macos/Build/Products/Release/evently.app
# 4. Windows Job
build-windows:
name: Build Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- run: flutter config --enable-windows-desktop
- run: flutter pub get
- run: flutter build windows --release
- uses: actions/upload-artifact@v5
with:
name: windows-app
path: build/windows/x64/runner/Release/
# 5. Linux Job
build-linux:
name: Build Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Linux Dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- run: flutter config --enable-linux-desktop
- run: flutter pub get
- run: flutter build linux --release
- uses: actions/upload-artifact@v5
with:
name: linux-app
path: build/linux/x64/release/bundle/