Skip to content

Commit

Permalink
Add CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lilmistake committed Dec 21, 2023
1 parent 01ade8c commit f802603
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
flutter_channel: [stable]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

- name: Install CMake and Ninja
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y cmake ninja-build

- name: Install GTK and pkg-config (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y libgtk-3-dev pkg-config

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.16.5'

- name: Install dependencies
run: flutter pub get

- name: Build Web
if: matrix.os == 'ubuntu-latest'
run: flutter build web

- name: Upload Web Artifact
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v2
with:
name: web-build
path: app/build/web

- name: Build Android
if: matrix.os == 'ubuntu-latest'
run: flutter build apk

- name: Upload Android Artifact
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v2
with:
name: android-apk
path: app/build/app/outputs/flutter-apk/app-release.apk

- name: Build Windows
if: matrix.os == 'windows-latest'
run: flutter build windows

- name: Upload Windows Artifact
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v2
with:
name: windows-build
path: app/build/windows/runner/Release

- name: Build Linux
if: matrix.os == 'ubuntu-latest'
run: flutter build linux

- name: Upload Linux Artifact
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v2
with:
name: linux-build
path: app/build/linux/x64/release/bundle

0 comments on commit f802603

Please sign in to comment.