Skip to content

Merge pull request #7 from sagnik150699/codex/fix-flutter-dependency-… #25

Merge pull request #7 from sagnik150699/codex/fix-flutter-dependency-…

Merge pull request #7 from sagnik150699/codex/fix-flutter-dependency-… #25

Workflow file for this run

name: Flutter CI/CD
on:
push:
branches:
- master
jobs:
build_windows:
name: Build Android, Web, and Windows
runs-on: windows-latest
steps:
# Step 1: Checkout the Repository
- name: Checkout Repository
uses: actions/checkout@v2
# Step 2: Set up JDK for Android build
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
# Step 3: Install Flutter
- name: Install Flutter
run: |
git clone https://github.com/flutter/flutter.git --depth 1 -b stable _flutter
# Step 4: Flutter Configuration for Windows
- name: Flutter Config
run: ${{ github.workspace }}\_flutter\bin\flutter.bat config --enable-windows-desktop
# Step 5: Install Dependencies (Flutter packages)
- name: Install Dependencies
run: ${{ github.workspace }}\_flutter\bin\flutter.bat pub get
# Step 6: Build Windows Executable
- name: Build Windows Executable
run: ${{ github.workspace }}\_flutter\bin\flutter.bat build windows
# Step 7: Upload Windows Artifact
- name: Upload Windows Artifact
uses: actions/upload-artifact@v4
with:
name: windows-app
path: build/windows/runner/Release/
# Step 8: Build Android APK
- name: Build Android APK
run: ${{ github.workspace }}\_flutter\bin\flutter.bat build apk --release
# Step 9: Upload APK Artifact
- name: Upload APK Artifact
uses: actions/upload-artifact@v4
with:
name: android-app
path: build/app/outputs/flutter-apk/app-release.apk
# Step 10: Build Web Application
- name: Build Web
run: ${{ github.workspace }}\_flutter\bin\flutter.bat build web --release
# Step 11: Upload Web Artifact
- name: Upload Web Artifact
uses: actions/upload-artifact@v4
with:
name: web-app
path: build/web/
build_ios:
name: Build iOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: "17.x"
- uses: subosito/flutter-action@v1
with:
flutter-version: '3.24.2'
- run : flutter pub get
- run: flutter build ios --no-codesign