Skip to content

feat: github action #11

feat: github action

feat: github action #11

Workflow file for this run

name: flutter
on: [push]
env:
APP_NAME: magneto
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
- run: flutter config --enable-linux-desktop
- run: flutter build linux --release
- uses: actions/upload-artifact@v3
with:
name: linux_x64_${{ env.APP_NAME }}
path: build/linux/x64/release/bundle/${{ env.APP_NAME }}
android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter pub get
- run: flutter build apk --release
- run: flutter build appbundle --release
- uses: actions/upload-artifact@v3
with:
name: android_${{ env.APP_NAME }}
path: build/app/outputs/flutter-apk/app-release.apk
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'beta'
- run: flutter config --enable-windows-desktop
- run: flutter build windows --release
- uses: actions/upload-artifact@v3
with:
name: windows_x64_${{ env.APP_NAME }}
path: build\windows\x64\runner\Release\${{ env.APP_NAME }}.exe
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
architecture: x64
- run: flutter config --enable-macos-desktop
- run: flutter build macos --release
- uses: actions/upload-artifact@v3
with:
name: macos_x64_${{ env.APP_NAME }}
path: build/macos/Build/Products/Release/${{ env.APP_NAME }}.app/Contents
macos_arm:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
architecture: arm64
# - run: flutter config --enable-macos-desktop
- run: flutter build macos --release
- uses: actions/upload-artifact@v3
with:
name: macos_arm64_${{ env.APP_NAME }}
path: build/macos/Build/Products/Release/${{ env.APP_NAME }}.app/Contents