Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
DawnMagnet committed Mar 2, 2024
1 parent 2327b96 commit e8fb7f4
Showing 1 changed file with 48 additions and 18 deletions.
66 changes: 48 additions & 18 deletions .github/workflows/flutter-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,29 @@ on:
- main

jobs:
build-and-release:
build-and-release-on-ubuntu:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.x"
channel: "stable"

- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
- name: Flutter Pub Get
run: flutter pub get

- name: Build Android APK
run: flutter build apk

- name: Build iOS app
run: flutter build ios --release --no-codesign

- name: Build macOS app
run: flutter build macos

- name: Build Windows app
run: flutter build windows

- name: Build web app
run: flutter build web

Expand All @@ -45,13 +41,11 @@ jobs:
name: release-artifacts
path: |
build/app/outputs/apk/release/
build/ios/iphoneos/Runner.app
build/macos/Build/Products/Release/Runner.app
build/windows/runner/Release/
build/web/
release:
needs: build-and-release
release-on-ubuntu:
needs: build-and-release-on-ubuntu
runs-on: ubuntu-latest

steps:
Expand All @@ -65,10 +59,46 @@ jobs:
with:
files: |
build/app/outputs/apk/release/*.apk
build/ios/iphoneos/Runner.app
build/macos/Build/Products/Release/Runner.app
build/windows/runner/Release/*.exe
build/web/
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-and-release-on-macos:
runs-on: macos-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"

- name: Install dependencies
run: flutter pub get

- name: Build iOS app
run: flutter build ios --release --no-codesign

- name: Build macOS app
run: flutter build macos

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: release-artifacts
path: |
build/ios/iphoneos/Runner.app
build/macos/Build/Products/Release/Runner.app
build-and-release-on-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: "stable"
- run: flutter build windows

0 comments on commit e8fb7f4

Please sign in to comment.