Skip to content

Commit

Permalink
new fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sagar Shende committed Jun 5, 2024
1 parent d892bf0 commit 850e20b
Showing 1 changed file with 21 additions and 66 deletions.
87 changes: 21 additions & 66 deletions .github/workflows/flutter-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
name: Flutter CI

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

- develop
name: "Build & Release"
jobs:
build-android:
build:
name: Build and Release APK
runs-on: ubuntu-latest
steps:
Expand All @@ -21,68 +25,19 @@ jobs:
uses: subosito/flutter-action@v1
with:
channel: 'stable'

- name: Get Flutter Dependencies
run: flutter pub get

- name: Build APK
run: flutter build apk --release --split-per-abi

- name: Upload APK
if: success()
uses: actions/upload-artifact@v2
with:
name: android-apk
path: build/app/outputs/apk/release/*.apk

build-ios:
name: Build and Release iOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v1

- name: Setup Flutter
uses: subosito/flutter-action@v1
with:
channel: 'stable'

- name: Get Flutter Dependencies
run: flutter pub get

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

- name: Upload iOS Build
if: success()
uses: actions/upload-artifact@v2
with:
name: ios-build
path: build/ios/iphoneos/app.ipa
# path: build/ios/iphoneos/Runner.app

release:
name: Create Release
runs-on: ubuntu-latest
needs: [build-android, build-ios]
steps:
- uses: actions/checkout@v1

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: android-apk
path: ./artifacts/android

- uses: actions/download-artifact@v2
with:
name: ios-build
path: ./artifacts/ios

- name: Create Release

- run: flutter build apk --release --split-per-abi
- run: |
flutter build ios --no-codesign
cd build/ios/iphoneos
mkdir Payload
cd Payload
ln -s ../Runner.app
cd ..
zip -r app.ipa Payload
- name: Push to Releases
uses: ncipollo/release-action@v1
with:
artifacts: |
./artifacts/android/*
./artifacts/ios/*
artifacts: "build/app/outputs/apk/release/*.apk,build/ios/iphoneos/app.ipa"
tag: v1.0.${{ github.run_number }}
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.TOKEN }}

0 comments on commit 850e20b

Please sign in to comment.