mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
201 lines
5.9 KiB
YAML
201 lines
5.9 KiB
YAML
name: Build Fladder
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- develop
|
|
pull_request:
|
|
branches:
|
|
- develop
|
|
|
|
jobs:
|
|
#Implement linting/tests here first
|
|
flutter-checks:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4.1.1
|
|
|
|
- name: Set up Flutter
|
|
uses: subosito/flutter-action@v2.12.0
|
|
with:
|
|
channel: "stable"
|
|
cache: true
|
|
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
|
|
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
|
|
|
|
- name: Get dependencies
|
|
run: flutter pub get
|
|
|
|
build-android:
|
|
needs: flutter-checks
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4.1.1
|
|
|
|
- name: Set up Flutter
|
|
uses: subosito/flutter-action@v2.12.0
|
|
with:
|
|
channel: "stable"
|
|
cache: true
|
|
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
|
|
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
|
|
|
|
- name: Get dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Build Android APK
|
|
run: flutter build apk
|
|
|
|
- name: Archive Android artifact
|
|
uses: actions/upload-artifact@v4.0.0
|
|
with:
|
|
name: Android
|
|
path: build/app/outputs/apk/release/app-release.apk
|
|
|
|
build-windows:
|
|
needs: flutter-checks
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4.1.1
|
|
|
|
- name: Set up Flutter
|
|
uses: subosito/flutter-action@v2.12.0
|
|
with:
|
|
channel: "stable"
|
|
cache: true
|
|
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
|
|
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
|
|
|
|
- name: Get dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Build Windows EXE
|
|
run: flutter build windows
|
|
|
|
- name: Archive Windows artifact
|
|
uses: actions/upload-artifact@v4.0.0
|
|
with:
|
|
name: Windows
|
|
path: build\windows\x64\runner\Release\
|
|
|
|
# build-ios:
|
|
# runs-on: macos-latest
|
|
|
|
# steps:
|
|
# - name: Checkout repository
|
|
# uses: actions/checkout@v4.1.1
|
|
|
|
# - name: Set up Flutter
|
|
# uses: subosito/flutter-action@v2.12.0
|
|
# with:
|
|
# channel: "stable"
|
|
# cache: true
|
|
# cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
|
|
# cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
|
|
|
|
# - name: Get dependencies
|
|
# run: flutter pub get
|
|
|
|
# - name: Build iOS app
|
|
# run: flutter build ios
|
|
|
|
# - name: Archive iOS artifact
|
|
# uses: actions/upload-artifact@v2
|
|
# with:
|
|
# name: ios
|
|
# path: build/ios/iphoneos/Runner.app
|
|
|
|
build-macos:
|
|
needs: flutter-checks
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4.1.1
|
|
|
|
- name: Set up Flutter
|
|
uses: subosito/flutter-action@v2.12.0
|
|
with:
|
|
channel: "stable"
|
|
cache: true
|
|
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
|
|
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
|
|
|
|
- name: Get dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Build macOS app
|
|
run: flutter build macos
|
|
|
|
- name: Archive macOS artifact
|
|
uses: actions/upload-artifact@v4.0.0
|
|
with:
|
|
name: macOS
|
|
path: build/macos/Build/Products/Release/fladder.app
|
|
|
|
# build-linux:
|
|
# needs: flutter-checks
|
|
# runs-on: ubuntu-latest
|
|
|
|
# steps:
|
|
# - name: Checkout repository
|
|
# uses: actions/checkout@v4.1.1
|
|
|
|
# - name: Set up Flutter
|
|
# uses: subosito/flutter-action@v2.12.0
|
|
# with:
|
|
# channel: "stable"
|
|
# cache: true
|
|
# cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
|
|
# cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
|
|
|
|
# - name: Get dependencies
|
|
# run: flutter pub get
|
|
|
|
# - name: Get packages
|
|
# run: |
|
|
# sudo apt-get update -y
|
|
# sudo apt-get install -y ninja-build libgtk-3-dev
|
|
|
|
# - name: Build Linux app
|
|
# run: flutter build linux
|
|
|
|
# - name: Archive Linux artifact
|
|
# uses: actions/upload-artifact@v2
|
|
# with:
|
|
# name: linux
|
|
# path: build/linux/x64/release/bundle
|
|
|
|
build-web:
|
|
needs: flutter-checks
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4.1.1
|
|
|
|
- name: Set up Flutter
|
|
uses: subosito/flutter-action@v2.12.0
|
|
with:
|
|
channel: "stable"
|
|
cache: true
|
|
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
|
|
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
|
|
|
|
- name: Get dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Build web app
|
|
run: flutter build web
|
|
|
|
- name: Archive web artifact
|
|
uses: actions/upload-artifact@v4.0.0
|
|
with:
|
|
name: Web
|
|
path: build/web
|