Skip to content

🛠️ Build

🛠️ Build #2

Workflow file for this run

name: '🛠️ Build'
on:
workflow_dispatch:
env:
FLUTTER_CHANNEL: 'beta'
JAVA_VERSION: '17'
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: ${{ env.FLUTTER_CHANNEL }}
cache: true
- name: Get dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
- name: Build linux
run: flutter build linux --release
- name: compress bundle
run: tar -czf linux-bundle.tar.xz build/linux/x64/release/bundle
- uses: actions/upload-artifact@v4
with:
name: linux
path: linux-bundle.tar.xz
android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: ${{ env.FLUTTER_CHANNEL }}
cache: true
- name: Setup java
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: ${{ env.JAVA_VERSION }}
- name: Build combined APK
run: flutter build apk --release
- name: Build split APKs
run: flutter build apk --release --split-per-abi
- uses: actions/upload-artifact@v4
with:
name: android-bundle
path: |
build/app/outputs/flutter-apk/app-release.apk
- uses: actions/upload-artifact@v4
with:
name: android-x86_64
path: |
build/app/outputs/flutter-apk/app-x86_64-release.apk
- uses: actions/upload-artifact@v4
with:
name: android-armeabi-v7a
path: |
build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk
- uses: actions/upload-artifact@v4
with:
name: android-arm64-v8a
path: |
build/app/outputs/flutter-apk/app-arm64-v8a-release.apk
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: ${{ env.FLUTTER_CHANNEL }}
- name: Build windows
run: flutter build windows --release
- uses: actions/upload-artifact@v4
with:
name: windows
path: build/windows/x64/
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
- run: flutter build macos
- uses: actions/upload-artifact@v4
with:
name: macos
path: build/macos