Skip to content

Build CI

Build CI #78

Workflow file for this run

name: Build CI
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-android:
name: Build Android
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '17'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Save the store key properties to android/key.properties
env:
ANDROID_STORE_KEY_PROPERTIES: ${{ secrets.ANDROID_STORE_KEY_PROPERTIES }}
run: |
echo $ANDROID_STORE_KEY_PROPERTIES > android/key.properties
- name: Decode the store key to android/GooglePlaystore.jks
env:
GOOGLE_PLAYSTORE_JKS_BASE64: ${{ secrets.GOOGLE_PLAYSTORE_JKS_BASE64 }}
run: |
echo $GOOGLE_PLAYSTORE_JKS_BASE64 | base64 --decode > android/GooglePlaystore.jks
- run: flutter --version
- run: flutter pub get
- run: flutter build apk
- run: flutter build appbundle
- uses: actions/upload-artifact@v3
with:
name: Android
path: |
build/app/outputs/flutter-apk/app-release.apk
build/app/outputs/bundle/release/app-release.aab
build-ios:
name: Build iOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
architecture: x64
- run: flutter pub get
- run: flutter build ios --release --no-codesign
- uses: actions/upload-artifact@v3
with:
name: iOS
path: build/ios/iphoneos/Runner.app
build-web:
name: Build Web
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter pub get
- run: flutter build web
build-windows:
name: Build Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter config --enable-windows-desktop
- run: flutter build windows
build-linux:
name: Build 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
build-macos:
name: Build 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